Logo Search packages:      
Sourcecode: jblas version File versions  Download package

boolean org::jblas::la::FloatMatrix::equals ( Object  o  )  [inline]

Compare two matrices. Returns true if and only if other is also a FloatMatrix which has the same size and the maximal absolute difference in matrix elements is smaller thatn 1e-6.

Definition at line 927 of file FloatMatrix.java.

References columns, max(), rows, sameSize(), and sub().

        if (!(o instanceof FloatMatrix)) {
            return false;

        FloatMatrix other = (FloatMatrix) o;

        if (!sameSize(other)) {
            return false;

        FloatMatrix diff = MatrixFunctions.absi(sub(other));

        return diff.max() / (rows * columns) < 1e-6;

Generated by  Doxygen 1.6.0   Back to index