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

FloatMatrix org::jblas::la::FloatMatrix::addi ( FloatMatrix  other,
FloatMatrix  result 
) [inline]

Add two matrices (in-place).

Definition at line 1305 of file FloatMatrix.java.

References addi(), assertSameLength(), data, ensureResultLength(), isScalar(), length, and scalar().

Referenced by add(), and addi().

        if (other.isScalar()) {
            return addi(other.scalar(), result);
        if (isScalar()) {
            return other.addi(scalar(), result);

        ensureResultLength(other, result);

        if (result == this) {
            SimpleBlas.axpy(1.0f, other, result);
        } else if (result == other) {
            SimpleBlas.axpy(1.0f, this, result);
        } else {
            /*SimpleBlas.copy(this, result);
            SimpleBlas.axpy(1.0f, other, result);*/
            JavaBlas.rzgxpy(length, result.data, data, other.data);

        return result;

Generated by  Doxygen 1.6.0   Back to index