public class PowerMatrix extends AbstractDoubleMatrixRel<PowerUnit,PowerMatrix,MutablePowerMatrix,Power>
Copyright (c) 2013-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
data
Constructor and Description |
---|
PowerMatrix(double[][] values,
PowerUnit unit,
StorageType storageType)
Construct a new Relative Immutable Double PowerMatrix.
|
PowerMatrix(DoubleMatrixData data,
PowerUnit unit) |
PowerMatrix(Power[][] values,
StorageType storageType)
Construct a new Relative Immutable Double PowerMatrix.
|
Modifier and Type | Method and Description |
---|---|
protected MutablePowerMatrix |
instantiateMutableType(DoubleMatrixData dmd,
PowerUnit unit)
Construct a new Relative Mutable DoubleMatrix of the right type.
|
protected Power |
instantiateScalar(double value,
PowerUnit unit)
Construct a new Relative Immutable DoubleScalar of the right type.
|
protected PowerMatrix |
instantiateType(DoubleMatrixData dmd,
PowerUnit unit)
Construct a new Relative Immutable DoubleMatrix of the right type.
|
PowerMatrix |
toDense()
Create a dense version of this DoubleMatrix.
|
PowerMatrix |
toSparse()
Create a sparse version of this DoubleMatrix.
|
checkUnit, divide, ensureRectangularAndNonEmpty, get, minus, mutable, plus, times
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
public PowerMatrix(double[][] values, PowerUnit unit, StorageType storageType) throws ValueException
values
- double[][]; the values of the entries in the new Relative Immutable Double PowerMatrixunit
- U; the unit of the new Relative Immutable Double PowerMatrixstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic PowerMatrix(Power[][] values, StorageType storageType) throws ValueException
values
- DoubleScalar.Rel<U>[][]; the values of the entries in the new Relative Immutable Double PowerMatrixstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriesPowerMatrix(DoubleMatrixData data, PowerUnit unit)
data
- an internal data objectunit
- the unitpublic final PowerMatrix toDense()
public final PowerMatrix toSparse()
protected final PowerMatrix instantiateType(DoubleMatrixData dmd, PowerUnit unit)
instantiateType
in class AbstractDoubleMatrixRel<PowerUnit,PowerMatrix,MutablePowerMatrix,Power>
dmd
- an internal data objectunit
- the unitprotected final MutablePowerMatrix instantiateMutableType(DoubleMatrixData dmd, PowerUnit unit)
instantiateMutableType
in class AbstractDoubleMatrixRel<PowerUnit,PowerMatrix,MutablePowerMatrix,Power>
dmd
- an internal data objectunit
- the unitprotected final Power instantiateScalar(double value, PowerUnit unit)
instantiateScalar
in class AbstractDoubleMatrixRel<PowerUnit,PowerMatrix,MutablePowerMatrix,Power>
value
- the valueunit
- the unitCopyright © 2015–2018 Delft University of Technology. All rights reserved.