public class MoneyPerDurationVector extends AbstractDoubleVectorRel<MoneyPerDurationUnit,MoneyPerDurationVector,MutableMoneyPerDurationVector,MoneyPerDuration>
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
AbstractDoubleVectorRel.Itr
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.
|
MoneyPerDuration[] |
toArray()
Return an array of MoneyPerDuration Scalars from this vector.
|
MoneyPerDurationVector |
toDense()
return a dense version of this vector.
|
MoneyPerDurationVector |
toSparse()
return a sparse version of this vector.
|
checkUnit, checkUnit, checkUnit, divide, get, iterator, 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, setDisplayUnit
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public MoneyPerDurationVector(double[] values, MoneyPerDurationUnit unit, StorageType storageType) throws ValueException
values
- double[]; the values of the entries in the new Relative Immutable Double MoneyPerDurationVectorunit
- MoneyPerDurationUnit; the unit of the new Relative Immutable Double MoneyPerDurationVectorstorageType
- StorageType; 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<Double>; the values of the entries in the new Relative Immutable Double MoneyPerDurationVectorunit
- MoneyPerDurationUnit; the unit of the new Relative Immutable Double MoneyPerDurationVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic MoneyPerDurationVector(MoneyPerDuration[] values, StorageType storageType) throws ValueException
values
- MoneyPerDuration[]; the values of the entries in the new Relative Immutable Double MoneyPerDurationVectorstorageType
- StorageType; 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<MoneyPerDuration>; the values of the entries in the new Relative Immutable Double
MoneyPerDurationVectorstorageType
- StorageType; 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
- SortedMap<Integer, MoneyPerDuration>; the values of the entries in the new Relative Sparse Mutable
Double MoneyPerDurationVectorlength
- int; the size of the vectorstorageType
- StorageType; 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
- SortedMap<Integer, Double>; the map of indexes to values of the Relative Sparse Mutable Double
MoneyPerDurationVectorunit
- MoneyPerDurationUnit; the unit of the new Relative Sparse Mutable Double MoneyPerDurationVectorlength
- int; the size of the vectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullMoneyPerDurationVector(DoubleVectorData data, MoneyPerDurationUnit unit)
data
- DoubleVectorData; an internal data objectunit
- MoneyPerDurationUnit; the unitprotected final MoneyPerDurationVector instantiateType(DoubleVectorData dvd, MoneyPerDurationUnit unit)
instantiateType
in class AbstractDoubleVectorRel<MoneyPerDurationUnit,MoneyPerDurationVector,MutableMoneyPerDurationVector,MoneyPerDuration>
dvd
- DoubleVectorData; an internal data objectunit
- U; the unitprotected final MutableMoneyPerDurationVector instantiateMutableType(DoubleVectorData dvd, MoneyPerDurationUnit unit)
instantiateMutableType
in class AbstractDoubleVectorRel<MoneyPerDurationUnit,MoneyPerDurationVector,MutableMoneyPerDurationVector,MoneyPerDuration>
dvd
- DoubleVectorData; an internal data objectunit
- U; the unitprotected final MoneyPerDuration instantiateScalar(double value, MoneyPerDurationUnit unit)
instantiateScalar
in class AbstractDoubleVectorRel<MoneyPerDurationUnit,MoneyPerDurationVector,MutableMoneyPerDurationVector,MoneyPerDuration>
value
- double; the valueunit
- U; the unitpublic final MoneyPerDurationVector toDense()
public final MoneyPerDurationVector toSparse()
public MoneyPerDuration[] toArray()
RuntimeException
- wrapping a ValueException on error getting one of the valuesCopyright © 2015–2019 Delft University of Technology. All rights reserved.