U - the unitR - the relative matrix typeMR - the mutable relative matrix typeS - the relative scalar typeabstract class AbstractFloatMatrixRel<U extends Unit<U>,R extends AbstractFloatMatrixRel<U,R,MR,S>,MR extends AbstractMutableFloatMatrixRel<U,R,MR,S>,S extends AbstractFloatScalarRel<U,S>> extends AbstractFloatMatrix<U,R> implements FloatMatrixInterface<U>, Relative, Serializable
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 |
|---|
AbstractFloatMatrixRel(float[][] values,
U unit,
StorageType storageType)
Construct a new Relative Immutable FloatMatrix.
|
AbstractFloatMatrixRel(FloatMatrixData data,
U unit)
Construct a new Relative Immutable FloatMatrix.
|
AbstractFloatMatrixRel(S[][] values,
StorageType storageType)
Construct a new Relative Immutable FloatMatrix.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) static <U extends Unit<U>,S extends AbstractFloatScalarRel<U,S>> |
checkUnit(S[][] dsArray)
Check that a provided array can be used to create some descendant of a FloatMatrix, and return the Unit.
|
R |
divide(R rel)
Divide this Relative value by a Relative value for a matrix or matrix.
|
protected static <U extends Unit<U>,S extends AbstractFloatScalarRel<U,S>> |
ensureRectangularAndNonEmpty(S[][] values)
Check that a 2D array of FloatScalar<?> is rectangular; i.e.
|
S |
get(int row,
int column)
Retrieve a value from the matrix.
|
protected abstract MR |
instantiateMutableType(FloatMatrixData dmd,
U unit)
Construct a new Relative Mutable FloatMatrix of the right type.
|
protected abstract S |
instantiateScalar(float value,
U unit)
Construct a new Relative Immutable FloatScalar of the right type.
|
protected abstract R |
instantiateType(FloatMatrixData dmd,
U unit)
Construct a new Relative Immutable FloatMatrix of the right type.
|
R |
minus(R rel)
Subtract a Relative value from this Relative value for a matrix or matrix.
|
MR |
mutable()
Create a mutable version of this FloatMatrix.
|
R |
plus(R rel)
Add a Relative value to this Relative value for a matrix or matrix.
|
R |
times(R rel)
Multiply a Relative value with this Relative value for a matrix or matrix.
|
cardinality, 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, waitcardinality, columns, determinant, getInUnit, getInUnit, getSI, getValuesInUnit, getValuesInUnit, getValuesSI, rows, toDense, toSparse, toString, toString, toString, toString, zSumAbstractFloatMatrixRel(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 Relative Immutable FloatMatrixstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values is nullAbstractFloatMatrixRel(S[][] values, StorageType storageType) throws ValueException
values - S[][]; the values of the entries in the new Relative Immutable FloatMatrixstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values has zero entriesAbstractFloatMatrixRel(FloatMatrixData data, U unit)
data - FloatMatrixData; an internal data objectunit - U; the unitpublic MR mutable()
protected abstract R instantiateType(FloatMatrixData dmd, U unit)
dmd - FloatMatrixData; an internal data objectunit - U; the unitprotected abstract MR instantiateMutableType(FloatMatrixData dmd, U unit)
dmd - FloatMatrixData; an internal data objectunit - U; the unitprotected abstract S instantiateScalar(float value, U unit)
value - float; the valueunit - U; the unitpublic final S get(int row, int column) throws ValueException
get in interface FloatMatrixInterface<U extends Unit<U>>row - int; row of the value to retrievecolumn - int; column of the value to retrieveValueException - in case row or column is out of boundspublic final R plus(R rel) throws ValueException
rel - R; the right operandValueException - in case this matrix or matrix and the operand have a different sizepublic final R minus(R rel) throws ValueException
rel - R; the right operandValueException - in case this matrix or matrix and the operand have a different sizepublic final R times(R rel) throws ValueException
rel - R; the right operandValueException - in case this matrix or matrix and the operand have a different sizepublic final R divide(R rel) throws ValueException
rel - R; the right operandValueException - in case this matrix or matrix and the operand have a different sizestatic <U extends Unit<U>,S extends AbstractFloatScalarRel<U,S>> U checkUnit(S[][] dsArray) throws ValueException
U - the unitS - the scalar typedsArray - S[][]; the array to check and get the unit forValueException - when the array is null, has length equal to 0, or has first entry with length equal to 0protected static <U extends Unit<U>,S extends AbstractFloatScalarRel<U,S>> void ensureRectangularAndNonEmpty(S[][] values) throws ValueException
U - the unitS - the scalar typevalues - S[][]; the 2D array to checkValueException - when values is not rectangular, or contains no dataCopyright © 2015–2019 Delft University of Technology. All rights reserved.