Java Utililty Methods Array Subtract

List of utility methods to do Array Subtract

Description

The list of methods to do Array Subtract are organized into topic(s).

Method

double[]subtractSignals(double[] s1, double[] s2)
subtract Signals
return addSignals(s1, 1.0, s2, -1.0);
voidsubtractTo(double a[][][], double b[][][])
Subtract every entry of matrix b to the corresponding entry in matrix a.
for (int i = 0; i < a.length; i++)
    for (int j = 0; j < a[i].length; j++)
        for (int k = 0; k < a[i][j].length; k++)
            a[i][j][k] -= b[i][j][k];
int[]subtractUnitsArray(int[] units1, int[] units2)
Add the exponent array of this token with the argument array, and return the result in a new array.
int[] negation = null;
if (!isUnitless(units2)) {
    int length = units2.length;
    negation = new int[length];
    for (int i = 0; i < length; i++) {
        negation[i] = -units2[i];
return addUnitsArray(units1, negation);
voidSubtractVec2D(double[] vec2Ret, double[] vec2A, double[] vec2B)
Subtract Vec D
vec2Ret[0] = vec2A[0] - vec2B[0];
vec2Ret[1] = vec2A[1] - vec2B[1];
voidSubtractVec3D(double[] vec3Ret, double[] vec3A, double[] vec3B)
Subtract Vec D
vec3Ret[0] = vec3A[0] - vec3B[0];
vec3Ret[1] = vec3A[1] - vec3B[1];
vec3Ret[2] = vec3A[2] - vec3B[2];