public final class Operators extends Object
| Modifier and Type | Method and Description |
|---|---|
static double[] |
differenceOf(double[] left,
double[] right)
Take the element-by-element difference of the two arrays and return the result in a new array.
|
static double[] |
productOf(double[] left,
double[] right)
Take the element-by-element product of the two arrays and return the result in a new array.
|
static double[] |
quotientOf(double[] numerator,
double[] denominator)
Take the element-by-element quotient of the two arrays and return the result in a new array.
|
static double[] |
scale(double[] original,
double alpha)
Scale the original data by alpha and return the result in a new array.
|
static double[] |
subtract(double[] data,
double value)
Subtract the given value from each element of the supplied data and return the result in a new array.
|
static double[] |
sumOf(double[] left,
double[] right)
Take the element-by-element sum of the two arrays and return the result in a new array.
|
public static double[] productOf(double[] left,
double[] right)
left - the first array to take the product with.right - the second array to take the product with.public static double[] sumOf(double[] left,
double[] right)
left - the first array to take the sum with.right - the second array to take the sum with.public static double[] differenceOf(double[] left,
double[] right)
left - the first array to take the difference with.right - the second array to take the difference with.public static double[] quotientOf(double[] numerator,
double[] denominator)
numerator - the array of numerators.denominator - the array of denominators.public static double[] scale(double[] original,
double alpha)
original - the data to be scaled.alpha - the scaling factor.public static double[] subtract(double[] data,
double value)
data - the data to subtract the value from.value - the value to be subtracted.