public static MatrixFunction asMulFunction(final double arg) {
        return new MatrixFunction() {
            @Override
            public double evaluate(int i, int j, double value) {
                return value * arg;
            }
        };
    }
public static MatrixFunction asMulFunction ( final double arg ) { return new MatrixFunction ( ) { @ Override public double evaluate ( int i , int j , double value ) { return value * arg ; } } ; }
Creates a mul function that multiplies given {@code value} by it's argument.

@param arg a value to be multiplied by function's argument

@return a closure that does {@code _ * _}