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 AbstractFloatMatrixAbs<AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,A extends AbstractFloatMatrixAbs<AU,RU,A,R,MA,S>,R extends AbstractFloatMatrixRel<RU,R,?,?>,MA extends AbstractMutableFloatMatrixAbs<AU,RU,A,R,MA,S>,S extends AbstractFloatScalarAbs<AU,S,RU,?>> extends AbstractFloatMatrix<AU,A> implements FunctionsAbs<AU,RU,A,R>, FloatMatrixInterface<AU>, Absolute, 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 |
|---|
AbstractFloatMatrixAbs(float[][] values,
AU unit,
StorageType storageType)
Construct a new Absolute Immutable FloatMatrix.
|
AbstractFloatMatrixAbs(FloatMatrixData data,
AU unit)
Construct a new Relative Immutable FloatMatrix.
|
AbstractFloatMatrixAbs(S[][] values,
StorageType storageType)
Construct a new Absolute Immutable FloatMatrix.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) static <AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,S extends AbstractFloatScalarAbs<AU,S,RU,?>> |
checkUnit(S[][] dsArray)
Check that a provided array can be used to create some descendant of a FloatMatrix, and return the Unit.
|
protected static <AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,S extends AbstractFloatScalarAbs<AU,S,RU,?>> |
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 MA |
instantiateMutableType(FloatMatrixData dmd,
AU unit)
Construct a new Absolute Mutable FloatMatrix of the right type.
|
protected abstract S |
instantiateScalar(float value,
AU unit)
Construct a new Absolute Immutable FloatScalar of the right type.
|
protected abstract A |
instantiateTypeAbs(FloatMatrixData dmd,
AU unit)
Construct a new Absolute Immutable FloatMatrix of the right type.
|
protected abstract R |
instantiateTypeRel(FloatMatrixData dmd,
RU unit)
Construct a new Relative Immutable FloatMatrix of the right type.
|
R |
minus(A abs)
Subtract an Absolute value from this Absolute value for a vector or matrix.
|
A |
minus(R rel)
Subtract a Relative value from this Absolute value for a vector or matrix.
|
MA |
mutable()
Create a mutable version of this FloatMatrix.
|
A |
plus(R rel)
Add a Relative value to this Absolute value for a vector 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, zSumAbstractFloatMatrixAbs(float[][] values,
AU unit,
StorageType storageType)
throws ValueException
values - float[][]; the values of the entries in the new Absolute Immutable FloatMatrixunit - AU; the unit of the new Absolute Immutable FloatMatrixstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values is nullAbstractFloatMatrixAbs(S[][] values, StorageType storageType) throws ValueException
values - S[][]; the values of the entries in the new Absolute Immutable FloatMatrixstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values has zero entriesAbstractFloatMatrixAbs(FloatMatrixData data, AU unit)
data - FloatMatrixData; an internal data objectunit - AU; the unitpublic MA mutable()
protected abstract A instantiateTypeAbs(FloatMatrixData dmd, AU unit)
dmd - FloatMatrixData; an internal data objectunit - AU; the unitprotected abstract R instantiateTypeRel(FloatMatrixData dmd, RU unit)
dmd - FloatMatrixData; an internal data objectunit - RU; the unitprotected abstract MA instantiateMutableType(FloatMatrixData dmd, AU unit)
dmd - FloatMatrixData; an internal data objectunit - AU; the unitprotected abstract S instantiateScalar(float value, AU unit)
value - float; the valueunit - AU; the unitpublic final S get(int row, int column) throws ValueException
get in interface FloatMatrixInterface<AU extends AbsoluteLinearUnit<AU,RU>>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 A plus(R rel) throws ValueException
plus in interface FunctionsAbs<AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,A extends AbstractFloatMatrixAbs<AU,RU,A,R,MA,S>,R extends AbstractFloatMatrixRel<RU,R,?,?>>rel - R; R the right operandValueException - in case this vector and the operand have a different sizepublic final A minus(R rel) throws ValueException
minus in interface FunctionsAbs<AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,A extends AbstractFloatMatrixAbs<AU,RU,A,R,MA,S>,R extends AbstractFloatMatrixRel<RU,R,?,?>>rel - R; R the right operandValueException - in case this vector and the operand have a different sizepublic final R minus(A abs) throws ValueException
minus in interface FunctionsAbs<AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,A extends AbstractFloatMatrixAbs<AU,RU,A,R,MA,S>,R extends AbstractFloatMatrixRel<RU,R,?,?>>abs - A; A the right operandValueException - in case this vector and the operand have a different sizestatic <AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,S extends AbstractFloatScalarAbs<AU,S,RU,?>> AU checkUnit(S[][] dsArray) throws ValueException
AU - the absolute unitRU - the corresponding relative 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 <AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,S extends AbstractFloatScalarAbs<AU,S,RU,?>> void ensureRectangularAndNonEmpty(S[][] values) throws ValueException
AU - the absolute unitRU - the corresponding relative 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.