MATH-696
Default implementation for "addToEntry" and "multiplyEntry". git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1188941 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d0be1f663e
commit
6ed1d06677
|
@ -564,10 +564,16 @@ public abstract class AbstractRealMatrix
|
|||
public abstract void setEntry(int row, int column, double value);
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public abstract void addToEntry(int row, int column, double increment);
|
||||
public void addToEntry(int row, int column, double increment) {
|
||||
MatrixUtils.checkMatrixIndex(this, row, column);
|
||||
setEntry(row, column, getEntry(row, column) + increment);
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public abstract void multiplyEntry(int row, int column, double factor);
|
||||
public void multiplyEntry(int row, int column, double factor) {
|
||||
MatrixUtils.checkMatrixIndex(this, row, column);
|
||||
setEntry(row, column, getEntry(row, column) * factor);
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public RealMatrix transpose() {
|
||||
|
|
|
@ -52,6 +52,10 @@ The <action> type attribute can be add,update,fix,remove.
|
|||
If the output is not quite correct, check for invisible trailing spaces!
|
||||
-->
|
||||
<release version="3.0" date="TBD" description="TBD">
|
||||
<action dev="erans" type="update" issue="MATH-696">
|
||||
Default implementation for "addToEntry" and "multiplyEntry" in
|
||||
"AbstractRealMatrix".
|
||||
</action>
|
||||
<action dev="erans" type="add" issue="MATH-685">
|
||||
Method "addToEntry" in "RealVector".
|
||||
</action>
|
||||
|
|
Loading…
Reference in New Issue