AU
- the absolute unitRU
- the relative unitA
- the absolute matrix typeR
- the relative matrix typeMA
- the mutable absolute matrix typeS
- the absolute scalar typeabstract class AbstractMutableDoubleMatrixAbs<AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,A extends AbstractDoubleMatrixAbs<AU,RU,A,R,MA,S>,R extends AbstractDoubleMatrixRel<RU,R,?,?>,MA extends AbstractMutableDoubleMatrixAbs<AU,RU,A,R,MA,S>,S extends AbstractDoubleScalarAbs<AU,S,RU,?>> extends AbstractDoubleMatrixAbs<AU,RU,A,R,MA,S> implements Mutable, MathFunctionsAbs<MA>, DoubleMathFunctions<MA>
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUNITS License.
$LastChangedDate: 2015-09-29 14:14:28 +0200 (Tue, 29 Sep 2015) $, @version $Revision: 73 $, by $Author: pknoppers $, initial
version Sep 5, 2015
data
Constructor and Description |
---|
AbstractMutableDoubleMatrixAbs(double[][] values,
AU unit,
StorageType storageType)
Construct a new Absolute Mutable DoubleMatrix.
|
AbstractMutableDoubleMatrixAbs(DoubleMatrixData data,
AU unit)
Construct a new Absolute Mutable DoubleMatrix.
|
AbstractMutableDoubleMatrixAbs(S[][] values,
StorageType storageType)
Construct a new Absolute Mutable DoubleMatrix.
|
Modifier and Type | Method and Description |
---|---|
void |
assign(DoubleFunction doubleFunction)
Execute a function on a cell by cell basis.
|
MA |
ceil()
Set the value(s) to the smallest (closest to negative infinity) value(s) that are greater than or equal to the argument
and equal to a mathematical integer.
|
protected void |
checkCopyOnWrite()
Check the copyOnWrite flag and, if it is set, make a deep copy of the data and clear the flag.
|
MA |
copy()
Create a deep copy of this MutableDoubleMatrix.
|
MA |
decrementBy(double decrement)
Decrement the value by the supplied constant and return the changed matrix.
|
MA |
decrementBy(R decrement)
Decrement the value by the supplied value and return the changed matrix.
|
MA |
decrementBy(S decrement)
Decrement the value by the supplied value and return the changed matrix.
|
MA |
divideBy(double factor)
Scale the value(s) by the inverse of a factor; i.e.
|
MA |
floor()
Set the value(s) to the largest (closest to positive infinity) value(s) that are less than or equal to the argument and
equal to a mathematical integer.
|
A |
immutable()
Create a immutable version of this MutableDoubleMatrix.
|
MA |
incrementBy(double increment)
Increment the value by the supplied constant and return the changed matrix.
|
MA |
incrementBy(R increment)
Increment the value by the supplied value and return the changed matrix.
|
MA |
incrementBy(S increment)
Increment the value by the supplied value and return the changed matrix.
|
MA |
multiplyBy(double factor)
Scale the value(s) by a factor.
|
MA |
multiplyBy(R factors)
Multiply the values in the matrix by the supplied values and return the changed matrix.
|
MA |
mutable()
Create a mutable version of this DoubleMatrix.
|
void |
normalize()
Normalize the matrix, i.e.
|
MA |
rint()
Set the value(s) to the value(s) that are closest in value to the argument and equal to a mathematical integer.
|
MA |
round()
Set the value(s) to the closest long to the argument with ties rounding up.
|
void |
set(int row,
int column,
S value)
Set the value for a cell in the matrix.
|
(package private) void |
setCopyOnWrite(boolean copyOnWrite)
Change the copyOnWrite flag.
|
void |
setInUnit(int row,
int column,
double value,
AU valueUnit)
Set the value for a cell in the matrix.
|
void |
setSI(int row,
int column,
double valueSI)
Set the value for a cell in the matrix.
|
checkUnit, ensureRectangularAndNonEmpty, get, instantiateMutableType, instantiateScalar, instantiateTypeAbs, instantiateTypeRel, minus, minus, plus
cardinality, checkIndex, checkSize, checkSize, columns, determinant, ensureRectangularAndNonEmpty, equals, getData, getInUnit, getInUnit, getSI, getStorageType, getValuesInUnit, getValuesInUnit, getValuesSI, hashCode, rows, toString, toString, toString, toString, zSum
expressAsSIUnit, expressAsSpecifiedUnit, getUnit, isAbsolute, isRelative, setDisplayUnit
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
DIV, MULT, POW
toDense, toSparse
AbstractMutableDoubleMatrixAbs(double[][] values, AU unit, StorageType storageType) throws ValueException
values
- double[][]; the values of the entries in the new Absolute Immutable DoubleMatrixunit
- AU; the unit of the new Absolute Immutable DoubleMatrixstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullAbstractMutableDoubleMatrixAbs(S[][] values, StorageType storageType) throws ValueException
values
- S[][]; the values of the entries in the new Absolute Immutable DoubleMatrixstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriesAbstractMutableDoubleMatrixAbs(DoubleMatrixData data, AU unit)
data
- DoubleMatrixData; an internal data objectunit
- AU; the unitfinal void setCopyOnWrite(boolean copyOnWrite)
copyOnWrite
- boolean; the new value for the copyOnWrite flagpublic final MA mutable()
mutable
in class AbstractDoubleMatrixAbs<AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,A extends AbstractDoubleMatrixAbs<AU,RU,A,R,MA,S>,R extends AbstractDoubleMatrixRel<RU,R,?,?>,MA extends AbstractMutableDoubleMatrixAbs<AU,RU,A,R,MA,S>,S extends AbstractDoubleScalarAbs<AU,S,RU,?>>
public final A immutable()
public final MA copy()
public final MA incrementBy(R increment) throws ValueException
increment
- R; amount by which the value is incrementedValueException
- when the size of increment is not identical to the size of thispublic final MA incrementBy(S increment)
increment
- S; amount by which the value is incrementedpublic final MA incrementBy(double increment)
increment
- double; amount by which the value is incrementedpublic final MA decrementBy(R decrement) throws ValueException
decrement
- R; amount by which the value is decrementedValueException
- when the size of increment is not identical to the size of thispublic final MA decrementBy(S decrement)
decrement
- S; amount by which the value is decrementedpublic final MA decrementBy(double decrement)
decrement
- double; amount by which the value is decrementedpublic final MA multiplyBy(double factor)
multiplyBy
in interface DoubleMathFunctions<MA extends AbstractMutableDoubleMatrixAbs<AU,RU,A,R,MA,S>>
factor
- double; the multiplierpublic MA divideBy(double factor)
divideBy
in interface DoubleMathFunctions<MA extends AbstractMutableDoubleMatrixAbs<AU,RU,A,R,MA,S>>
factor
- double; the divisorpublic final MA multiplyBy(R factors) throws ValueException
factors
- R; amounts by which the value is multipliedValueException
- when the size of the factors is not identical to the size of thispublic final void assign(DoubleFunction doubleFunction)
doubleFunction
- DoubleFunction; the function to applypublic final MA ceil()
ceil
in interface MathFunctionsAbs<MA extends AbstractMutableDoubleMatrixAbs<AU,RU,A,R,MA,S>>
public final MA floor()
floor
in interface MathFunctionsAbs<MA extends AbstractMutableDoubleMatrixAbs<AU,RU,A,R,MA,S>>
public final MA rint()
rint
in interface MathFunctionsAbs<MA extends AbstractMutableDoubleMatrixAbs<AU,RU,A,R,MA,S>>
public final MA round()
round
in interface MathFunctionsAbs<MA extends AbstractMutableDoubleMatrixAbs<AU,RU,A,R,MA,S>>
protected final void checkCopyOnWrite()
public final void setSI(int row, int column, double valueSI) throws ValueException
row
- int; the rowcolumn
- int; the columnvalueSI
- double; the value, expressed in the SI unitValueException
- when the row/column is out of rangepublic final void set(int row, int column, S value) throws ValueException
row
- int; the rowcolumn
- int; the columnvalue
- S; the valueValueException
- when the row/column is out of rangepublic final void setInUnit(int row, int column, double value, AU valueUnit) throws ValueException
row
- int; the rowcolumn
- int; the columnvalue
- double; the value, expressed in the given unitvalueUnit
- AU; the unit of the valueValueException
- when the row/column is out of rangepublic final void normalize() throws ValueException
ValueException
- when the sum of the values is zero and normalization is not possibleCopyright © 2015–2019 Delft University of Technology. All rights reserved.