public static BMatrixRMaj elementLessThan(DMatrixRMaj A , double value , BMatrixRMaj output )
    {
        if( output == null ) {
            output = new BMatrixRMaj(A.numRows,A.numCols);
        }

        output.reshape(A.numRows, A.numCols);

        int N = A.getNumElements();

        for (int i = 0; i < N; i++) {
            output.data[i] = A.data[i] < value;
        }

        return output;
    }
public static BMatrixRMaj elementLessThan ( DMatrixRMaj A , double value , BMatrixRMaj output ) { if ( output == null ) { output = new BMatrixRMaj ( A . numRows , A . numCols ) ; } output . reshape ( A . numRows , A . numCols ) ; int N = A . getNumElements ( ) ; for ( int i = 0 ; i < N ; i ++ ) { output . data [ i ] = A . data [ i ] < value ; } return output ; }
Applies the &gt; operator to each element in A.  Results are stored in a boolean matrix.

@param A Input matrx
@param value value each element is compared against
@param output (Optional) Storage for results.  Can be null. Is reshaped.
@return Boolean matrix with results