@Override public final Matrix times( final SparseMatrix other) { return other.preTimes(this); }
@Override public final Matrix times( final SparseMatrix other) { return other.preTimes(this); }
@Override public final Matrix times( final SparseMatrix other) { return other.preTimes(this); }
@Override public final Matrix times( final SparseMatrix other) { this.assertMultiplicationDimensions(other); if (!other.isCompressed()) { other.compress(); } final int numRows = this.getNumRows(); final DenseVector[] resultRows = new DenseVector[numRows]; for (int i = 0; i < numRows; ++i) { resultRows[i] = (DenseVector) other.preTimes(this.rows[i]); } return new DenseMatrix(resultRows); }
@Override public final Matrix times( final SparseMatrix other) { this.assertMultiplicationDimensions(other); if (!other.isCompressed()) { other.compress(); } final int numRows = this.getNumRows(); final DenseVector[] resultRows = new DenseVector[numRows]; for (int i = 0; i < numRows; ++i) { resultRows[i] = (DenseVector) other.preTimes(this.rows[i]); } return new DenseMatrix(resultRows); }
@Override public final Matrix times( final SparseMatrix other) { this.assertMultiplicationDimensions(other); if (!other.isCompressed()) { other.compress(); } final int numRows = this.getNumRows(); final DenseVector[] resultRows = new DenseVector[numRows]; for (int i = 0; i < numRows; ++i) { resultRows[i] = (DenseVector) other.preTimes(this.rows[i]); } return new DenseMatrix(resultRows); }