public class MutableFloatMoneyVector extends AbstractMutableFloatVectorRel<MoneyUnit,FloatMoneyVector,MutableFloatMoneyVector,FloatMoney>
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.
AbstractFloatVectorRel.Itr
data
Constructor and Description |
---|
MutableFloatMoneyVector(float[] values,
MoneyUnit unit,
StorageType storageType)
Construct a new Relative Immutable Float MoneyVector.
|
MutableFloatMoneyVector(FloatMoney[] values,
StorageType storageType)
Construct a new Relative Immutable Float MoneyVector.
|
MutableFloatMoneyVector(FloatVectorData data,
MoneyUnit unit) |
MutableFloatMoneyVector(List<Float> values,
MoneyUnit unit,
StorageType storageType)
Construct a new Relative Immutable Float MoneyVector.
|
MutableFloatMoneyVector(List<FloatMoney> values,
StorageType storageType)
Construct a new Relative Immutable Float MoneyVector.
|
MutableFloatMoneyVector(SortedMap<Integer,Float> values,
MoneyUnit unit,
int length,
StorageType storageType)
Construct a new Relative Immutable Float MoneyVector.
|
MutableFloatMoneyVector(SortedMap<Integer,FloatMoney> values,
int length,
StorageType storageType)
Construct a new Relative Immutable Float MoneyVector.
|
Modifier and Type | Method and Description |
---|---|
protected MutableFloatMoneyVector |
instantiateMutableType(FloatVectorData dvd,
MoneyUnit unit)
Construct a new Relative Mutable FloatVector of the right type.
|
protected FloatMoney |
instantiateScalar(float value,
MoneyUnit unit)
Construct a new Relative Immutable FloatScalar of the right type.
|
protected FloatMoneyVector |
instantiateType(FloatVectorData dvd,
MoneyUnit unit)
Construct a new Relative Immutable FloatVector of the right type.
|
FloatMoney[] |
toArray()
Return an array of FloatMoney Scalars from this vector.
|
MutableFloatMoneyVector |
toDense()
return a dense version of this vector.
|
MutableFloatMoneyVector |
toSparse()
return a sparse version of this vector.
|
abs, assign, ceil, checkCopyOnWrite, copy, decrementBy, decrementBy, decrementBy, divideBy, divideBy, divideBy, floor, immutable, incrementBy, incrementBy, incrementBy, multiplyBy, multiplyBy, multiplyBy, mutable, neg, normalize, rint, round, set, setCopyOnWrite, setInUnit, setSI
checkUnit, checkUnit, checkUnit, divide, get, iterator, minus, 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
DIV, MULT, POW
cardinality, getInUnit, getInUnit, getSI, getValuesInUnit, getValuesInUnit, getValuesSI, size, toString, toString, toString, toString, zSum
forEach, spliterator
public MutableFloatMoneyVector(float[] values, MoneyUnit unit, StorageType storageType) throws ValueException
values
- float[]; the values of the entries in the new Relative Immutable Float MoneyVectorunit
- MoneyUnit; the unit of the new Relative Immutable Float MoneyVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic MutableFloatMoneyVector(List<Float> values, MoneyUnit unit, StorageType storageType) throws ValueException
values
- List<Float>; the values of the entries in the new Relative Immutable Float MoneyVectorunit
- MoneyUnit; the unit of the new Relative Immutable Float MoneyVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic MutableFloatMoneyVector(FloatMoney[] values, StorageType storageType) throws ValueException
values
- FloatMoney[]; the values of the entries in the new Relative Immutable Float MoneyVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic MutableFloatMoneyVector(List<FloatMoney> values, StorageType storageType) throws ValueException
values
- List<FloatMoney>; the values of the entries in the new Relative Immutable Float MoneyVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic MutableFloatMoneyVector(SortedMap<Integer,FloatMoney> values, int length, StorageType storageType) throws ValueException
values
- SortedMap<Integer, FloatMoney>; the values of the entries in the new Relative Sparse Mutable Float
MoneyVectorlength
- int; the size of the vectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic MutableFloatMoneyVector(SortedMap<Integer,Float> values, MoneyUnit unit, int length, StorageType storageType) throws ValueException
values
- SortedMap<Integer, Float>; the map of indexes to values of the Relative Sparse Mutable Float
MoneyVectorunit
- MoneyUnit; the unit of the new Relative Sparse Mutable Float MoneyVectorlength
- int; the size of the vectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullMutableFloatMoneyVector(FloatVectorData data, MoneyUnit unit)
data
- FloatVectorData; an internal data objectunit
- MoneyUnit; the unitprotected final FloatMoneyVector instantiateType(FloatVectorData dvd, MoneyUnit unit)
instantiateType
in class AbstractFloatVectorRel<MoneyUnit,FloatMoneyVector,MutableFloatMoneyVector,FloatMoney>
dvd
- FloatVectorData; an internal data objectunit
- U; the unitprotected final MutableFloatMoneyVector instantiateMutableType(FloatVectorData dvd, MoneyUnit unit)
instantiateMutableType
in class AbstractFloatVectorRel<MoneyUnit,FloatMoneyVector,MutableFloatMoneyVector,FloatMoney>
dvd
- FloatVectorData; an internal data objectunit
- U; the unitprotected final FloatMoney instantiateScalar(float value, MoneyUnit unit)
instantiateScalar
in class AbstractFloatVectorRel<MoneyUnit,FloatMoneyVector,MutableFloatMoneyVector,FloatMoney>
value
- float; the valueunit
- U; the unitpublic final MutableFloatMoneyVector toDense()
public final MutableFloatMoneyVector toSparse()
public FloatMoney[] toArray()
RuntimeException
- wrapping a ValueException on error getting one of the valuesCopyright © 2015–2019 Delft University of Technology. All rights reserved.