The list of methods to do Array Subtract are organized into topic(s).
byte[]
subtract(byte[] a, byte[] b) a - b
if (a == null)
throw new IllegalArgumentException("b1 should not be null");
if (b == null)
throw new IllegalArgumentException("b2 should not be null");
if (a.length != b.length)
throw new IllegalArgumentException("byte array length should be same");
int len = a.length;
byte[] result = new byte[len];
...
double[]
subtract(double[] a, double[] b) subtract
if (a.length != b.length) {
throw new IllegalArgumentException("Arrays must be equal length");
double[] c = new double[a.length];
for (int i = 0; i < a.length; i++) {
c[i] = a[i] - b[i];
return c;
...
double[]
subtract(double[] a, double[] b) Subtracts two points
if (a.length != b.length)
throw new IllegalArgumentException("Subtracted two not matching Vectors.");
double[] erg = new double[a.length];
for (int i = 0; i < a.length; i++) {
erg[i] = a[i] - b[i];
return erg;
double[]
subtract(double[] a, double[] b) Subtracts the two arrays together (componentwise)
if (a.length != b.length) {
throw new IllegalArgumentException(
"To add two arrays, they must have the same length : " + a.length + ", " + b.length);
double[] ans = copy(a);
for (int i = 0; i < a.length; i++) {
ans[i] -= b[i];
return (ans);
double[]
subtract(double[] a, double[] b) Returns the array-wise difference between two vectors.
double[] out = new double[a.length];
for (int i = 0; i < a.length; i++) {
out[i] = a[i] - b[i];
return out;
double[]
subtract(double[] accumulator, double[] values) Subtracts the elements of one array of
doubles from another.
if (accumulator == null) {
accumulator = new double[values.length];
assert (accumulator.length == values.length);
for (int i = 0; i < accumulator.length; i++) {
accumulator[i] -= values[i];
return accumulator;
...
double[]
subtract(double[] array, double value) Subtracts a constant value from all items in an array
double[] returnValues = new double[array.length];
for (int i = 0; i < returnValues.length; i++) {
returnValues[i] = array[i] - value;
return returnValues;