Applies the operation to each element of f1 and f2, which are assumed to be of the same size.
The result is stored in f1.

@param f1 Input factor 1 and the output factor.
@param f2 Input factor 2.
@param op The operation to apply.
542196
private static void elemApplyBinOp(final VarTensor f1, final VarTensor f2, final AlgebraLambda.LambdaBinOp op) {
        checkSameAlgebra(f1, f2);
        Algebra s = f1.s;
        if (f1.size() != f2.size()) {
            throw new IllegalArgumentException("VarTensors are different sizes");
        }
        for (int c = 0; c < f1.values.length; c++) {
            f1.values[c] = op.call(s, f1.values[c], f2.values[c]);
        }
    }
1194710
@Override
    public double compute(double a, double b) {
        if (Op.isLt(a + b, 1.0)) {
            return Op.max(a, b);
        }
        return 1.0;
    }
208078
def apply_operation(op_stack, out_stack):
    
    out_stack.append(calc(out_stack.pop(), out_stack.pop(), op_stack.pop()))
844480
function _gpfPow2 (n) {
    var result = _gpfPow2[n];
    if (result) {
        return result;
    }
    result = _gpfComputePow2(n);
    _gpfPow2[n] = result;
    return result;
}
1291896
public void field2inout(Object o, String field, Object comp) {
        field2inout(o, field, comp, field);
    }
677942
public Operation zCombinedAnd(Operation op)
    {
        if (op instanceof IsNotNullOperation)
        {
            return zCombineWithNotNullOperation((IsNotNullOperation) op);
        }
        if (op instanceof IsNullOperation)
        {
            return zCombineWithNullOperation((IsNullOperation) op);
        }
        return op.zCombinedAnd(this);
    }
712020
public void setFundamental( DMatrixRMaj F , Point3D_F64 e2 ) {
		this.F = F;
		if( e2 != null )
			this.e2.set(e2);
		else {
			MultiViewOps.extractEpipoles(F,new Point3D_F64(),this.e2);
		}
	}
1370315
public Operation.Info create( Symbol op , Variable left , Variable right ) {
        switch( op ) {
            case PLUS:
                return Operation.add(left, right, managerTemp);

            case MINUS:
                return Operation.subtract(left, right, managerTemp);

            case TIMES:
                return Operation.multiply(left, right, managerTemp);

            case RDIVIDE:
                return Operation.divide(left, right, managerTemp);

            case LDIVIDE:
                return Operation.divide(right, left, managerTemp);

            case POWER:
                return Operation.pow(left, right, managerTemp);

            case ELEMENT_DIVIDE:
                return Operation.elementDivision(left, right, managerTemp);

            case ELEMENT_TIMES:
                return Operation.elementMult(left, right, managerTemp);

            case ELEMENT_POWER:
                return Operation.elementPow(left, right, managerTemp);

            default:
                throw new RuntimeException("Unknown operation " + op);
        }
    }
451868
public static void and2by2(BitmapContainer container, SparseBitmap bitmap1,
			SparseBitmap bitmap2) {
		int it1 = 0;
		int it2 = 0;
		int p1 = bitmap1.buffer.get(it1), p2 = bitmap2.buffer.get(it2);
		int buff;
		while (true) {
			if (p1 < p2) {
				if (it1 + 2 >= bitmap1.buffer.size())
					break;
				it1 += 2;
				p1 += bitmap1.buffer.get(it1) + 1;
			} else if (p1 > p2) {
				if (it2 + 2 >= bitmap2.buffer.size())
					break;
				it2 += 2;
				p2 += bitmap2.buffer.get(it2) + 1;
			} else {
				if ((buff = bitmap1.buffer.get(it1 + 1)
						& bitmap2.buffer.get(it2 + 1)) != 0) {
					container.add(buff, p1);
				}

				if ((it1 + 2 >= bitmap1.buffer.size())
						|| (it2 + 2 >= bitmap2.buffer.size()))
					break;

				it1 += 2;
				it2 += 2;
				p1 += bitmap1.buffer.get(it1) + 1;
				p2 += bitmap2.buffer.get(it2) + 1;
			}
		}
	}
171431
public void set( Point2D_F64 p1 , Point2D_F64 p2 ) {
		this.p1.set(p1);
		this.p2.set(p2);
	}
413731
public void setFundamental( DMatrixRMaj F , Point3D_F64 e2 ) {
		if( e2 != null )
			this.e2.set(e2);
		else {
			MultiViewOps.extractEpipoles(F,new Point3D_F64(),this.e2);
		}
		GeometryMath_F64.multCrossA(this.e2,F,A);
	}
533574
@SuppressWarnings("unchecked")
    public void setOps(final DBObject ops) {
        this.ops = (Map<String, Map<String, Object>>) ops;
    }
1283670
@Pure
	public static double operator_power(Double a, Number b) {
		return Math.pow(a, b.doubleValue());
	}
1198196
public static int safeAdd(
        int op1,
        int op2
    ) {

        if (op2 == 0) {
            return op1;
        }

        long result = ((long) op1) + ((long) op2);

        if ((result < Integer.MIN_VALUE) || (result > Integer.MAX_VALUE)) {
            StringBuilder sb = new StringBuilder(32);
            sb.append("Integer overflow: (");
            sb.append(op1);
            sb.append(',');
            sb.append(op2);
            sb.append(')');
            throw new ArithmeticException(sb.toString());
        } else {
            return (int) result;
        }

    }
550014
public void setFields(T0 value0, T1 value1, T2 value2) {
		this.f0 = value0;
		this.f1 = value1;
		this.f2 = value2;
	}
827274
def _divf(ins):
    ''' 
    '''
    op1, op2 = tuple(ins.quad[2:])

    if is_float(op2) and float(op2) == 1:  # Nothing to do. A / 1 = A
        output = _float_oper(op1)
        output.extend(_fpush())
        return output

    output = _float_oper(op1, op2)
    output.append('call __DIVF')
    output.extend(_fpush())
    REQUIRES.add('divf.asm')
    return output
1015846
@Override
    public double compute(double a, double b) {
        if (Op.isGt(a + b, 1.0)) {
            return Op.min(a, b);
        }
        return 0.0;
    }