src/main/java/eu/digitisation/math/Arrays.java
public static double scalar(double[] x, double[] y) {
        double sum = 0;
        for (int n = 0; n < x.length; ++n) {
            sum += x[n] * y[n];
        }
        return sum;
    }
/**
     * The scalar product
     *
     * @param x the first array
     * @param y the second array
     * @return the scalar product of x and y
     */
The scalar product
@param x the first array
@param y the second array
@return the scalar product of x and y
The scalar product @param x the first array @param y the second array @return the scalar product of x and y
public static double scalar(double[] x, double[] y) {
        double sum = 0;
        for (int n = 0; n < x.length; ++n) {
            sum += x[n] * y[n];
        }
        return sum;
    }
public static double scalar ( double [ ] x , double [ ] y ) { double sum = 0 ; for ( int n = 0 ; n < x . length ; ++ n ) { sum += x [ n ] * y [ n ] ; } return sum ; }
The scalar product
 @param x the first array
 @param y the second array
 @return the scalar product of x and y
The scalar product @param x the first array @param y the second array @return the scalar product of x and y