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

DoubleMatrix org::jblas::la::DoubleMatrix::mini ( DoubleMatrix  other,
DoubleMatrix  result 
) [inline]

Computes the minimum between two matrices. Returns the smaller of the corresponding elements in the matrix (in-place).

Definition at line 1624 of file DoubleMatrix.java.

References get(), length, and put().

Referenced by min(), and mini().

                                                                      {
        if (result == this) {
            for (int i = 0; i < length; i++) {
                if (get(i) > other.get(i)) {
                    put(i, other.get(i));
                }
            }
        } else {
            for (int i = 0; i < length; i++) {
                if (get(i) > other.get(i)) {
                    result.put(i, other.get(i));
                } else {
                    result.put(i, get(i));
                }
            }
        }
        return this;
    }


Generated by  Doxygen 1.6.0   Back to index