public static MatrixAccumulator mkMaxAccumulator() {
        return new MatrixAccumulator() {
            private double result = Double.NEGATIVE_INFINITY;

            @Override
            public void update(int i, int j, double value) {
                result = Math.max(result, value);
            }

            @Override
            public double accumulate() {
                double value = result;
                result = Double.NEGATIVE_INFINITY;
                return value;
            }
        };
    }
public static MatrixAccumulator mkMaxAccumulator ( ) { return new MatrixAccumulator ( ) { private double result = Double . NEGATIVE_INFINITY ; @ Override public void update ( int i , int j , double value ) { result = Math . max ( result , value ) ; } @ Override public double accumulate ( ) { double value = result ; result = Double . NEGATIVE_INFINITY ; return value ; } } ; }
Makes a maximum matrix accumulator that accumulates the maximum of matrix elements.

@return a maximum vector accumulator