List of utility methods to do Matrix Product
double | dotProd(double[] a, double[] b) dot Prod if (a.length != b.length) { throw new IllegalArgumentException( "The dimensions have to be equal!"); double sum = 0; for (int i = 0; i < a.length; i++) { sum += a[i] * b[i]; return sum; |