Op double [ ].

@param a  the a
@param b  the b
@param fn the fn
@return the double [ ]
168242
@javax.annotation.Nonnull
  public static double[] op(@javax.annotation.Nonnull final double[] a, @javax.annotation.Nonnull final double[] b, @javax.annotation.Nonnull final DoubleBinaryOperator fn) {
    assert a.length == b.length;
    @javax.annotation.Nonnull final double[] c = new double[a.length];
    for (int j = 0; j < a.length; j++) {
      c[j] = fn.applyAsDouble(a[j], b[j]);
    }
    return c;
  }
1063273
@Pure
	@Inline(value="($1 % $2)", constantExpression=true)
	public static double operator_modulo(long a, double b) {
		return a % b;
	}
1318354
public static Double[] asDoubleArray(List<Double> input) {
		Double[] result = new Double[input.size()];

		for (int i = 0; i < result.length; i++) {
			result[i] = input.get(i);
		}

		return result;
	}
99172
public static DoubleBinaryOperator dx(DoubleBinaryOperator f)
    {
        return (x,y)->
        {
            double h = x != 0.0 ? SQRT_EPSILON*x : SQRT_EPSILON;
            double h2 = 2.0*h;
            double y1 = -f.applyAsDouble(x+h2, y);
            double y2 = 8.0*f.applyAsDouble(x+h, y);
            double y3 = -8.0*f.applyAsDouble(x-h, y);
            double y4 = f.applyAsDouble(x-h2, y);
            return (y1+y2+y3+y4)/(12.0*h);
        };
    }
84312
function(a, b, retArr) {
            if (retArr) {
                return [a, b, a + b];
            }
            return a + b;
        }
1334440
private double[][] concatenateArrays(double[][] first, double[][] second){
        // I am sure as hell that should be a better way to do this...
        double[][] result = new double[first.length][first[0].length + second[0].length];
        for(int i = 0; i < first.length; i++){
            for (int j = 0; j < (first[i].length + second[i].length); j++){
                if( j < first[i].length){
                    result[i][j] = first[i][j];
                } else{
                    result[i][j] = second[i][j - first[i].length];
                }
            }
        }
        return result;
    }
152218
public static void addInPlace(double[] a, double b) {
    for (int i = 0; i < a.length; i++) {
      a[i] = a[i] + b;
    }
  }
1139149
@Override
    public double compute(double a, double b) {
        return (a * b) / (2 - (a + b - a * b));
    }
924738
def mul(a, b):
  
  def multiply(a, b):
    """Multiplication"""
    return a * b
  return op_with_scalar_cast(a, b, multiply)
608206
public static float[] doubleArrayToFloatArray(double[] a) {
    float[] result = new float[a.length];
    for (int i = 0; i < a.length; i++) {
      result[i] = (float) a[i];
    }
    return result;
  }
899106
public static int[] pairwiseAdd(int[] a, int[] b) {
    int[] result = new int[a.length];
    for (int i = 0; i < a.length; i++) {
      result[i] = a[i] + b[i];
    }
    return result;
  }
371631
@javax.annotation.Nonnull
  public static List<double[]> op(@javax.annotation.Nonnull final List<double[]> a, @javax.annotation.Nonnull final DoubleUnaryOperator fn) {
    @javax.annotation.Nonnull final ArrayList<double[]> list = new ArrayList<>();
    for (int i = 0; i < a.size(); i++) {
      @javax.annotation.Nonnull final double[] c = new double[a.get(i).length];
      for (int j = 0; j < a.get(i).length; j++) {
        c[j] = fn.applyAsDouble(a.get(i)[j]);
      }
      list.add(c);
    }
    return list;
  }
1190754
public static DoubleBinding pow(final ObservableDoubleValue a, final double b) {
        return createDoubleBinding(() -> Math.pow(a.get(), b), a);
    }
1140365
public static <R> Stream<R> zip(final double[] a, final double[] b, final double[] c, final DoubleTriFunction<R> zipFunction) {
        return zip(DoubleIteratorEx.of(a), DoubleIteratorEx.of(b), DoubleIteratorEx.of(c), zipFunction);
    }
577882
@Inline(value="$1.add($2)")
	@Pure
	public static BigInteger operator_plus(BigInteger a, BigInteger b) {
		return a.add(b);
	}
996740
public static double dot(@javax.annotation.Nonnull final List<double[]> a, @javax.annotation.Nonnull final List<double[]> b) {
    return com.simiacryptus.util.ArrayUtil.sum(com.simiacryptus.util.ArrayUtil.multiply(a, b));
  }
494827
public static double[][] inverse(double[][] A) {
    final int rows = A.length, cols = A[0].length;
    return rows == cols //
        ? (new LUDecomposition(A, rows, cols)).inverse() //
        : (new QRDecomposition(A, rows, cols)).inverse();
  }