public class FloatMoneyVector extends AbstractFloatVectorRel<MoneyUnit,FloatMoneyVector,MutableFloatMoneyVector,FloatMoney>
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.
AbstractFloatVectorRel.Itr
data
Constructor and Description |
---|
FloatMoneyVector(float[] values,
MoneyUnit unit,
StorageType storageType)
Construct a new Relative Immutable Float FloatMoneyVector.
|
FloatMoneyVector(FloatMoney[] values,
StorageType storageType)
Construct a new Relative Immutable Float FloatMoneyVector.
|
FloatMoneyVector(FloatVectorData data,
MoneyUnit unit) |
FloatMoneyVector(List<Float> values,
MoneyUnit unit,
StorageType storageType)
Construct a new Relative Immutable Float FloatMoneyVector.
|
FloatMoneyVector(List<FloatMoney> values,
StorageType storageType)
Construct a new Relative Immutable Float FloatMoneyVector.
|
FloatMoneyVector(SortedMap<Integer,Float> values,
MoneyUnit unit,
int length,
StorageType storageType)
Construct a new Relative Immutable Float FloatMoneyVector.
|
FloatMoneyVector(SortedMap<Integer,FloatMoney> values,
int length,
StorageType storageType)
Construct a new Relative Immutable Float FloatMoneyVector.
|
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.
|
FloatMoneyVector |
toDense()
return a dense version of this vector.
|
FloatMoneyVector |
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 FloatMoneyVector(float[] values, MoneyUnit unit, StorageType storageType) throws ValueException
values
- float[]; the values of the entries in the new Relative Immutable Float FloatMoneyVectorunit
- U; the unit of the new Relative Immutable Float FloatMoneyVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic FloatMoneyVector(List<Float> values, MoneyUnit unit, StorageType storageType) throws ValueException
values
- List; the values of the entries in the new Relative Immutable Float FloatMoneyVectorunit
- U; the unit of the new Relative Immutable Float FloatMoneyVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic FloatMoneyVector(FloatMoney[] values, StorageType storageType) throws ValueException
values
- FloatScalar.Rel<U>[]; the values of the entries in the new Relative Immutable Float FloatMoneyVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic FloatMoneyVector(List<FloatMoney> values, StorageType storageType) throws ValueException
values
- List; the values of the entries in the new Relative Immutable Float FloatMoneyVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic FloatMoneyVector(SortedMap<Integer,FloatMoney> values, int length, StorageType storageType) throws ValueException
values
- FloatScalar.Rel<U>[]; the values of the entries in the new Relative Sparse Mutable Float
FloatMoneyVectorlength
- the size of the vectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic FloatMoneyVector(SortedMap<Integer,Float> values, MoneyUnit unit, int length, StorageType storageType) throws ValueException
values
- Map; the map of indexes to values of the Relative Sparse Mutable Float FloatMoneyVectorunit
- U; the unit of the new Relative Sparse Mutable Float FloatMoneyVectorlength
- the size of the vectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullFloatMoneyVector(FloatVectorData data, MoneyUnit unit)
data
- an internal data objectunit
- the unitprotected final FloatMoneyVector instantiateType(FloatVectorData dvd, MoneyUnit unit)
instantiateType
in class AbstractFloatVectorRel<MoneyUnit,FloatMoneyVector,MutableFloatMoneyVector,FloatMoney>
dvd
- an internal data objectunit
- the unitprotected final MutableFloatMoneyVector instantiateMutableType(FloatVectorData dvd, MoneyUnit unit)
instantiateMutableType
in class AbstractFloatVectorRel<MoneyUnit,FloatMoneyVector,MutableFloatMoneyVector,FloatMoney>
dvd
- an internal data objectunit
- the unitprotected final FloatMoney instantiateScalar(float value, MoneyUnit unit)
instantiateScalar
in class AbstractFloatVectorRel<MoneyUnit,FloatMoneyVector,MutableFloatMoneyVector,FloatMoney>
value
- the valueunit
- the unitpublic final FloatMoneyVector toDense()
public final FloatMoneyVector toSparse()
public FloatMoney[] toArray()
RuntimeException
- wrapping a ValueException on error getting one of the valuesCopyright © 2015–2018 Delft University of Technology. All rights reserved.