Java Utililty Methods Array Value Dot Product

List of utility methods to do Array Value Dot Product

Description

The list of methods to do Array Value Dot Product are organized into topic(s).

Method

Double[]arrayDot(final Double[] first, final Double[] second)
multiplies the elements of the arrays.
final Double[] toret = new Double[first.length];
for (int i = 0; i < first.length; i++) {
    toret[i] = first[i] * second[i];
return toret;
String[]arrayDot2Zero(String[] values)
array Dot Zero
int count = values.length;
String[] results = new String[count];
for (int index = 0; index < count; index++) {
    if (values[index].equals(".")) {
        results[index] = "0";
    } else {
        results[index] = values[index];
return results;
double[]arrayMultiplication(double[] a, double[] b)
Elementwise multiplication of arrays
if (a == null || b == null) {
    return null;
if (a.length != b.length) {
    throw new ArrayStoreException("Array sizes do not match.");
if (a.length == 0) {
    throw new ArrayStoreException("Array of length zero.");
...
double[]arrayMultiply(double[] a, double[] b)
Multiplies two vectors of doubles, array-wise.
double[] out = new double[a.length];
for (int i = 0; i < a.length; i++) {
    out[i] = a[i] * b[i];
return out;
intarrayProduct(int[] vs)
array Product
int result = 1;
for (int i = 0; i < vs.length; i++) {
    result *= vs[i];
return result;