U - the unitR - the matrix typeMR - the mutable matrix typeS - the scalar typeabstract class AbstractMutableFloatMatrixRel<U extends Unit<U>,R extends AbstractFloatMatrixRel<U,R,MR,S>,MR extends AbstractMutableFloatMatrixRel<U,R,MR,S>,S extends AbstractFloatScalarRel<U,S>> extends AbstractFloatMatrixRel<U,R,MR,S> implements Mutable, MathFunctionsRel<MR>, FloatMathFunctions<MR>
Copyright (c) 2013-2018 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 |
|---|
AbstractMutableFloatMatrixRel(float[][] values,
U unit,
StorageType storageType)
Construct a new Relative Mutable FloatMatrix.
|
AbstractMutableFloatMatrixRel(FloatMatrixData data,
U unit)
Construct a new Relative Mutable FloatMatrix.
|
AbstractMutableFloatMatrixRel(S[][] values,
StorageType storageType)
Construct a new Relative Mutable FloatMatrix.
|
| Modifier and Type | Method and Description |
|---|---|
MR |
abs()
Set the value(s) to their absolute value.
|
void |
assign(FloatFunction floatFunction)
Execute a function on a cell by cell basis.
|
MR |
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.
|
MR |
copy()
Create a deep copy of this MutableFloatMatrix.
|
MR |
decrementBy(float decrement)
Decrement the value by the supplied constant and return the changed matrix.
|
MR |
decrementBy(R decrement)
Decrement the value by the supplied value and return the changed matrix.
|
MR |
decrementBy(S decrement)
Decrement the value by the supplied value and return the changed matrix.
|
MR |
divideBy(float factor)
Scale the value(s) by the inverse of a factor; i.e.
|
MR |
divideBy(R factors)
Divide the values in the matrix by the supplied values and return the changed matrix.
|
MR |
divideBy(S factor)
Divide the values in the matrix by the supplied value and return the changed matrix.
|
MR |
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.
|
R |
immutable()
Create a immutable version of this MutableFloatMatrix.
|
MR |
incrementBy(float increment)
Increment the value by the supplied constant and return the changed matrix.
|
MR |
incrementBy(R increment)
Increment the value by the supplied value and return the changed matrix.
|
MR |
incrementBy(S increment)
Increment the value by the supplied value and return the changed matrix.
|
MR |
multiplyBy(float factor)
Scale the value(s) by a factor.
|
MR |
multiplyBy(R factors)
Multiply the values in the matrix by the supplied values and return the changed matrix.
|
MR |
multiplyBy(S factor)
Multiply the values in the matrix by the supplied value and return the changed matrix.
|
MR |
mutable()
Create a mutable version of this FloatMatrix.
|
MR |
neg()
Set the value(s) to the minus value.
|
void |
normalize()
Normalize the matrix, i.e.
|
MR |
rint()
Set the value(s) to the value(s) that are closest in value to the argument and equal to a mathematical integer.
|
MR |
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,
float value,
U valueUnit)
Set the value for a cell in the matrix.
|
void |
setSI(int row,
int column,
float valueSI)
Set the value for a cell in the matrix.
|
checkUnit, divide, ensureRectangularAndNonEmpty, get, instantiateMutableType, instantiateScalar, instantiateType, minus, plus, timescardinality, checkIndex, checkSize, checkSize, columns, determinant, ensureRectangularAndNonEmpty, equals, getData, getInUnit, getInUnit, getSI, getStorageType, getValuesInUnit, getValuesInUnit, getValuesSI, hashCode, rows, toString, toString, toString, toString, zSumexpressAsSIUnit, expressAsSpecifiedUnit, getUnit, isAbsolute, isRelative, setDisplayUnitclone, finalize, getClass, notify, notifyAll, wait, wait, waitDIV, MULT, POWcardinality, columns, determinant, getInUnit, getInUnit, getSI, getValuesInUnit, getValuesInUnit, getValuesSI, rows, toDense, toSparse, toString, toString, toString, toString, zSumAbstractMutableFloatMatrixRel(float[][] values,
U unit,
StorageType storageType)
throws ValueException
values - float[][]; the values of the entries in the new Relative Immutable FloatMatrixunit - U; the unit of the new Absolute Immutable FloatMatrixstorageType - the data type to use (e.g., DENSE or SPARSE)ValueException - when values is nullAbstractMutableFloatMatrixRel(S[][] values, StorageType storageType) throws ValueException
values - S[][]; the values of the entries in the new Relative Immutable FloatMatrixstorageType - the data type to use (e.g., DENSE or SPARSE)ValueException - when values has zero entriesAbstractMutableFloatMatrixRel(FloatMatrixData data, U unit)
data - an internal data objectunit - the unitfinal void setCopyOnWrite(boolean copyOnWrite)
copyOnWrite - boolean; the new value for the copyOnWrite flagpublic final MR mutable()
public final R immutable()
public final MR copy()
public final MR incrementBy(R increment) throws ValueException
increment - FloatMatrix.Rel<U>; amount by which the value is incrementedValueException - when the size of increment is not identical to the size of thispublic final MR incrementBy(S increment)
increment - FloatScalar.Rel<U>; amount by which the value is incrementedpublic final MR incrementBy(float increment)
increment - amount by which the value is incrementedpublic final MR decrementBy(R decrement) throws ValueException
decrement - FloatMatrix.Rel<U>; amount by which the value is decrementedValueException - when the size of increment is not identical to the size of thispublic final MR decrementBy(S decrement)
decrement - FloatScalar.Rel<U>; amount by which the value is decrementedpublic final MR decrementBy(float decrement)
decrement - amount by which the value is decrementedpublic final MR multiplyBy(R factors) throws ValueException
factors - FloatMatrix.Rel<U>; amounts by which the value is multipliedValueException - when the size of the factors is not identical to the size of thispublic final MR multiplyBy(S factor)
factor - FloatScalar.Rel<U>; amount by which the values in the matrix are multipliedpublic final MR multiplyBy(float factor)
multiplyBy in interface FloatMathFunctions<MR extends AbstractMutableFloatMatrixRel<U,R,MR,S>>factor - float; the multiplierpublic final MR divideBy(R factors) throws ValueException
factors - FloatMatrix.Rel<U>; amounts by which the value is dividedValueException - when the size of the factors is not identical to the size of thispublic MR divideBy(float factor)
divideBy in interface FloatMathFunctions<MR extends AbstractMutableFloatMatrixRel<U,R,MR,S>>factor - float; the divisorpublic final MR divideBy(S factor)
factor - FloatScalar.Rel<U>; amount by which the values in the matrix are dividedpublic final void assign(FloatFunction floatFunction)
floatFunction - the function to applypublic final MR abs()
abs in interface MathFunctionsRel<MR extends AbstractMutableFloatMatrixRel<U,R,MR,S>>public final MR ceil()
ceil in interface MathFunctionsAbs<MR extends AbstractMutableFloatMatrixRel<U,R,MR,S>>public final MR floor()
floor in interface MathFunctionsAbs<MR extends AbstractMutableFloatMatrixRel<U,R,MR,S>>public final MR neg()
neg in interface MathFunctionsRel<MR extends AbstractMutableFloatMatrixRel<U,R,MR,S>>public final MR rint()
rint in interface MathFunctionsAbs<MR extends AbstractMutableFloatMatrixRel<U,R,MR,S>>public final MR round()
round in interface MathFunctionsAbs<MR extends AbstractMutableFloatMatrixRel<U,R,MR,S>>protected final void checkCopyOnWrite()
public final void setSI(int row,
int column,
float valueSI)
throws ValueException
row - the rowcolumn - the columnvalueSI - 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 - the rowcolumn - the columnvalue - the valueValueException - when the row/column is out of rangepublic final void setInUnit(int row,
int column,
float value,
U valueUnit)
throws ValueException
row - the rowcolumn - the columnvalue - the value, expressed in the given unitvalueUnit - 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–2018 Delft University of Technology. All rights reserved.