@Override public void minusEquals( final Matrix other) { // This is a generic implementation to support interoperability. // Sub-classes should make custom ones for performance. this.assertSameDimensions(other); for (final MatrixEntry entry : other) { this.decrement(entry.getRowIndex(), entry.getColumnIndex(), entry.getValue()); } }
@Override public void plusEquals( final Matrix other) { // This is a generic implementation to support interoperability. // Sub-classes should make custom ones for performance. this.assertSameDimensions(other); for (final MatrixEntry entry : other) { this.increment(entry.getRowIndex(), entry.getColumnIndex(), entry.getValue()); } }
@Override public void minusEquals( final Matrix other) { // This is a generic implementation to support interoperability. // Sub-classes should make custom ones for performance. this.assertSameDimensions(other); for (final MatrixEntry entry : other) { this.decrement(entry.getRowIndex(), entry.getColumnIndex(), entry.getValue()); } }
@Override public void plusEquals( final Matrix other) { // This is a generic implementation to support interoperability. // Sub-classes should make custom ones for performance. this.assertSameDimensions(other); for (final MatrixEntry entry : other) { this.increment(entry.getRowIndex(), entry.getColumnIndex(), entry.getValue()); } }
@Override public void plusEquals( final Matrix other) { // This is a generic implementation to support interoperability. // Sub-classes should make custom ones for performance. this.assertSameDimensions(other); for (final MatrixEntry entry : other) { this.increment(entry.getRowIndex(), entry.getColumnIndex(), entry.getValue()); } }
@Override public void minusEquals( final Matrix other) { // This is a generic implementation to support interoperability. // Sub-classes should make custom ones for performance. this.assertSameDimensions(other); for (final MatrixEntry entry : other) { this.decrement(entry.getRowIndex(), entry.getColumnIndex(), entry.getValue()); } }
@Override public void scaledPlusEquals( final double scaleFactor, final Matrix other) { // This is a generic implementation to support interoperability. // Sub-classes should make custom ones for performance. this.assertSameDimensions(other); for (final MatrixEntry entry : other) { this.increment(entry.getRowIndex(), entry.getColumnIndex(), scaleFactor * entry.getValue()); } }
@Override public void scaledPlusEquals( final double scaleFactor, final Matrix other) { // This is a generic implementation to support interoperability. // Sub-classes should make custom ones for performance. this.assertSameDimensions(other); for (final MatrixEntry entry : other) { this.increment(entry.getRowIndex(), entry.getColumnIndex(), scaleFactor * entry.getValue()); } }
@Override public void scaledPlusEquals( final double scaleFactor, final Matrix other) { // This is a generic implementation to support interoperability. // Sub-classes should make custom ones for performance. this.assertSameDimensions(other); for (final MatrixEntry entry : other) { this.increment(entry.getRowIndex(), entry.getColumnIndex(), scaleFactor * entry.getValue()); } }
@Override public void dotTimesEquals( final Matrix other) { // This is a generic implementation to support interoperability. // Sub-classes should make custom ones for performance. this.assertSameDimensions(other); for (final MatrixEntry entry : this) { entry.setValue(entry.getValue() * other.get(entry.getRowIndex(), entry.getColumnIndex())); } }
@Override public void dotTimesEquals( final Matrix other) { // This is a generic implementation to support interoperability. // Sub-classes should make custom ones for performance. this.assertSameDimensions(other); for (final MatrixEntry entry : this) { entry.setValue(entry.getValue() * other.get(entry.getRowIndex(), entry.getColumnIndex())); } }
@Override public void dotTimesEquals( final Matrix other) { // This is a generic implementation to support interoperability. // Sub-classes should make custom ones for performance. this.assertSameDimensions(other); for (final MatrixEntry entry : this) { entry.setValue(entry.getValue() * other.get(entry.getRowIndex(), entry.getColumnIndex())); } }
@Override public void dotDivideEquals( final Matrix other) { this.assertSameDimensions(other); // This is a dense loop since there is no sparsity in division. final int rowCount = this.getNumRows(); final int columnCount = this.getNumColumns(); for (int i = 0; i < rowCount; i++) { for (int j = 0; j < columnCount; j++) { this.setElement(i, j, this.getElement(i, j) / other.getElement(i, j)); } } }
@Override public void dotDivideEquals( final Matrix other) { this.assertSameDimensions(other); // This is a dense loop since there is no sparsity in division. final int rowCount = this.getNumRows(); final int columnCount = this.getNumColumns(); for (int i = 0; i < rowCount; i++) { for (int j = 0; j < columnCount; j++) { this.setElement(i, j, this.getElement(i, j) / other.getElement(i, j)); } } }
@Override public void dotDivideEquals( final Matrix other) { this.assertSameDimensions(other); // This is a dense loop since there is no sparsity in division. final int rowCount = this.getNumRows(); final int columnCount = this.getNumColumns(); for (int i = 0; i < rowCount; i++) { for (int j = 0; j < columnCount; j++) { this.setElement(i, j, this.getElement(i, j) / other.getElement(i, j)); } } }