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 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,?>> extends AbstractDoubleMatrix<AU,A> implements FunctionsAbs<AU,RU,A,R>, Absolute, Serializable
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 |
|---|
AbstractDoubleMatrixAbs(double[][] values,
AU unit,
StorageType storageType)
Construct a new Absolute Immutable DoubleMatrix.
|
AbstractDoubleMatrixAbs(DoubleMatrixData data,
AU unit)
Construct a new Relative Immutable DoubleMatrix.
|
AbstractDoubleMatrixAbs(S[][] values,
StorageType storageType)
Construct a new Absolute Immutable DoubleMatrix.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) static <AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,S extends AbstractDoubleScalarAbs<AU,S,RU,?>> |
checkUnit(S[][] dsArray)
Check that a provided array can be used to create some descendant of a DoubleMatrix, and return the Unit.
|
protected static <AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,S extends AbstractDoubleScalarAbs<AU,S,RU,?>> |
ensureRectangularAndNonEmpty(S[][] values)
Check that a 2D array of DoubleScalar<?> is rectangular; i.e.
|
S |
get(int row,
int column)
Retrieve a value from the matrix.
|
protected abstract MA |
instantiateMutableType(DoubleMatrixData dmd,
AU unit)
Construct a new Absolute Mutable DoubleMatrix of the right type.
|
protected abstract S |
instantiateScalar(double value,
AU unit)
Construct a new Absolute Immutable DoubleScalar of the right type.
|
protected abstract A |
instantiateTypeAbs(DoubleMatrixData dmd,
AU unit)
Construct a new Absolute Immutable DoubleMatrix of the right type.
|
protected abstract R |
instantiateTypeRel(DoubleMatrixData dmd,
RU unit)
Construct a new Relative Immutable DoubleMatrix 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 DoubleMatrix.
|
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, waittoDense, toSparseAbstractDoubleMatrixAbs(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 - the data type to use (e.g., DENSE or SPARSE)ValueException - when values is nullAbstractDoubleMatrixAbs(S[][] values, StorageType storageType) throws ValueException
values - S[][]; the values of the entries in the new Absolute Immutable DoubleMatrixstorageType - the data type to use (e.g., DENSE or SPARSE)ValueException - when values has zero entriesAbstractDoubleMatrixAbs(DoubleMatrixData data, AU unit)
data - an internal data objectunit - the unitpublic MA mutable()
protected abstract A instantiateTypeAbs(DoubleMatrixData dmd, AU unit)
dmd - an internal data objectunit - the unitprotected abstract R instantiateTypeRel(DoubleMatrixData dmd, RU unit)
dmd - an internal data objectunit - the unitprotected abstract MA instantiateMutableType(DoubleMatrixData dmd, AU unit)
dmd - an internal data objectunit - the unitprotected abstract S instantiateScalar(double value, AU unit)
value - the valueunit - the unitpublic final S get(int row, int column) throws ValueException
get in interface DoubleMatrixInterface<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 AbstractDoubleMatrixAbs<AU,RU,A,R,MA,S>,R extends AbstractDoubleMatrixRel<RU,R,?,?>>rel - 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 AbstractDoubleMatrixAbs<AU,RU,A,R,MA,S>,R extends AbstractDoubleMatrixRel<RU,R,?,?>>rel - 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 AbstractDoubleMatrixAbs<AU,RU,A,R,MA,S>,R extends AbstractDoubleMatrixRel<RU,R,?,?>>abs - 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 AbstractDoubleScalarAbs<AU,S,RU,?>> AU checkUnit(S[][] dsArray) throws ValueException
AU - the absolute unitRU - the corresponding relative unitS - the scalar typedsArray - 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 AbstractDoubleScalarAbs<AU,S,RU,?>> void ensureRectangularAndNonEmpty(S[][] values) throws ValueException
AU - the absolute unitRU - the corresponding relative unitS - the scalar typevalues - DoubleScalar<?>[][]; the 2D array to checkValueException - when values is not rectangular, or contains no dataCopyright © 2015–2018 Delft University of Technology. All rights reserved.