List of utility methods to do Array Multiply
void | multiply(double[] array, double multiplier) multiply int i, size = array.length; for (i = 0; i < size; i++) array[i] *= multiplier; |
double[] | multiply(double[] multiplicand, double[] factor, double multiplicandAdjustment, double factorAdjustment) Returns an array whose members are the product of the multiplicand array values and the factor array values. if (multiplicand.length != factor.length) { throw new IllegalArgumentException( "The multiplicand array and the factor array must be the same length"); double[] product = new double[multiplicand.length]; for (int i = 0; i < multiplicand.length; i++) { product[i] = (multiplicand[i] + multiplicandAdjustment) * (factor[i] + factorAdjustment); return product; |
double[] | multiply(double[] source, double num) Given an array A and a number n returns the product A*n Author: Bertoli Marco double[] ret = new double[source.length]; for (int i = 0; i < ret.length; i++) { ret[i] = source[i] * num; return ret; |
void | multiply(double[] values, int offset, int stride, int length, double multiplier) multiply for (int count = 0; count < length; count++) { values[offset] *= multiplier; offset += stride; |
void | multiply(final double[] a, double b, final double[] dest, int n) Multiplies the vector a (l1) with the constant b. assert a != null; assert dest != null; assert a.length >= n; assert dest.length >= n; for (int i = 0; i < n; i++) { dest[i] = a[i] * b; |
double[] | multiply(final double[] inout, final double[] in) Multiplies two FIR filters. if (inout.length != in.length) throw new RuntimeException("Filter lengths do not match!"); for (int i = 0; i < inout.length; i++) inout[i] *= in[i]; return inout; |
double[] | multiply(final double[] lhs, final double[] rhs) Calculates the product of two arrays of the same length. if (lhs.length != rhs.length) throw new IllegalArgumentException("Arrays must be of same length."); final int len = lhs.length; final double[] result = new double[len]; for (int i = 0; i < len; ++i) result[i] = lhs[i] * rhs[i]; return result; |
double[] | multiply(final double[] v1, final double[] v2) multiply if (v1.length != v2.length) { throw new RuntimeException(VECTORS_DIFFERENT_LENGTHS); final double[] result = new double[v1.length]; for (int i = 0; i < result.length; i++) { result[i] = v1[i] * v2[i]; return result; ... |
double[] | multiply(final double[] x, final double[] y) Returns newly allocated array which is the result of termwise multiplication of the input arrays final int len = x.length; if (len != y.length) throw new ArrayIndexOutOfBoundsException("Tried to multiply two vectors of unequal length!"); final double ret[] = new double[len]; for (int i = 0; i < len; i++) ret[i] = x[i] * y[i]; return ret; |
float[] | multiply(final float[] complexA, final float[] complexB, final boolean overwriteA) multiply if (complexA.length != complexB.length) { return null; float[] complexResult = null; if (!overwriteA) { complexResult = new float[complexA.length]; final int wComplex = complexA.length / 2; ... |