public class MoneyPerDurationVector extends AbstractDoubleVectorRel<MoneyPerDurationUnit,MoneyPerDurationVector,MutableMoneyPerDurationVector,MoneyPerDuration>
Copyright (c) 2013-2017 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 |
---|
MoneyPerDurationVector(double[] values,
MoneyPerDurationUnit unit,
StorageType storageType)
Construct a new Relative Immutable Double MoneyPerDurationVector.
|
MoneyPerDurationVector(DoubleVectorData data,
MoneyPerDurationUnit unit) |
MoneyPerDurationVector(List<Double> values,
MoneyPerDurationUnit unit,
StorageType storageType)
Construct a new Relative Immutable Double MoneyPerDurationVector.
|
MoneyPerDurationVector(List<MoneyPerDuration> values,
StorageType storageType)
Construct a new Relative Immutable Double MoneyPerDurationVector.
|
MoneyPerDurationVector(MoneyPerDuration[] values,
StorageType storageType)
Construct a new Relative Immutable Double MoneyPerDurationVector.
|
MoneyPerDurationVector(SortedMap<Integer,Double> values,
MoneyPerDurationUnit unit,
int length,
StorageType storageType)
Construct a new Relative Immutable Double MoneyPerDurationVector.
|
MoneyPerDurationVector(SortedMap<Integer,MoneyPerDuration> values,
int length,
StorageType storageType)
Construct a new Relative Immutable Double MoneyPerDurationVector.
|
Modifier and Type | Method and Description |
---|---|
protected MutableMoneyPerDurationVector |
instantiateMutableType(DoubleVectorData dvd,
MoneyPerDurationUnit unit)
Construct a new Relative Mutable DoubleVector of the right type.
|
protected MoneyPerDuration |
instantiateScalar(double value,
MoneyPerDurationUnit unit)
Construct a new Relative Immutable DoubleScalar of the right type.
|
protected MoneyPerDurationVector |
instantiateType(DoubleVectorData dvd,
MoneyPerDurationUnit unit)
Construct a new Relative Immutable DoubleVector of the right type.
|
MoneyPerDurationVector |
toDense()
return a dense version of this vector.
|
MoneyPerDurationVector |
toSparse()
return a sparse version of this vector.
|
checkUnit, checkUnit, checkUnit, divide, get, minus, mutable, plus, times
cardinality, checkIndex, checkSize, checkSize, equals, getData, getInUnit, getInUnit, getSI, getStorageType, getValuesInUnit, getValuesInUnit, getValuesSI, hashCode, size, toString, toString, toString, toString, zSum
expressAsSIUnit, expressAsSpecifiedUnit, getUnit, isAbsolute, isRelative
public MoneyPerDurationVector(double[] values, MoneyPerDurationUnit unit, StorageType storageType) throws ValueException
values
- double[]; the values of the entries in the new Relative Immutable Double MoneyPerDurationVectorunit
- U; the unit of the new Relative Immutable Double MoneyPerDurationVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic MoneyPerDurationVector(List<Double> values, MoneyPerDurationUnit unit, StorageType storageType) throws ValueException
values
- List; the values of the entries in the new Relative Immutable Double MoneyPerDurationVectorunit
- U; the unit of the new Relative Immutable Double MoneyPerDurationVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic MoneyPerDurationVector(MoneyPerDuration[] values, StorageType storageType) throws ValueException
values
- DoubleScalar.Rel<U>[]; the values of the entries in the new Relative Immutable Double
MoneyPerDurationVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic MoneyPerDurationVector(List<MoneyPerDuration> values, StorageType storageType) throws ValueException
values
- List; the values of the entries in the new Relative Immutable Double MoneyPerDurationVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic MoneyPerDurationVector(SortedMap<Integer,MoneyPerDuration> values, int length, StorageType storageType) throws ValueException
values
- DoubleScalar.Rel<U>[]; the values of the entries in the new Relative Sparse Mutable Double
MoneyPerDurationVectorlength
- the size of the vectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic MoneyPerDurationVector(SortedMap<Integer,Double> values, MoneyPerDurationUnit unit, int length, StorageType storageType) throws ValueException
values
- Map; the map of indexes to values of the Relative Sparse Mutable Double MoneyPerDurationVectorunit
- U; the unit of the new Relative Sparse Mutable Double MoneyPerDurationVectorlength
- the size of the vectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullMoneyPerDurationVector(DoubleVectorData data, MoneyPerDurationUnit unit)
data
- an internal data objectunit
- the unitprotected final MoneyPerDurationVector instantiateType(DoubleVectorData dvd, MoneyPerDurationUnit unit)
instantiateType
in class AbstractDoubleVectorRel<MoneyPerDurationUnit,MoneyPerDurationVector,MutableMoneyPerDurationVector,MoneyPerDuration>
dvd
- an internal data objectunit
- the unitprotected final MutableMoneyPerDurationVector instantiateMutableType(DoubleVectorData dvd, MoneyPerDurationUnit unit)
instantiateMutableType
in class AbstractDoubleVectorRel<MoneyPerDurationUnit,MoneyPerDurationVector,MutableMoneyPerDurationVector,MoneyPerDuration>
dvd
- an internal data objectunit
- the unitprotected final MoneyPerDuration instantiateScalar(double value, MoneyPerDurationUnit unit)
instantiateScalar
in class AbstractDoubleVectorRel<MoneyPerDurationUnit,MoneyPerDurationVector,MutableMoneyPerDurationVector,MoneyPerDuration>
value
- the valueunit
- the unitpublic final MoneyPerDurationVector toDense()
public final MoneyPerDurationVector toSparse()
Copyright © 2015–2017 Delft University of Technology. All rights reserved.