public class MutableFloatSpeedVector extends AbstractMutableFloatVectorRel<SpeedUnit,FloatSpeedVector,MutableFloatSpeedVector,FloatSpeed>
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 |
---|
MutableFloatSpeedVector(float[] values,
SpeedUnit unit,
StorageType storageType)
Construct a new Relative Immutable Float SpeedVector.
|
MutableFloatSpeedVector(FloatSpeed[] values,
StorageType storageType)
Construct a new Relative Immutable Float SpeedVector.
|
MutableFloatSpeedVector(FloatVectorData data,
SpeedUnit unit) |
MutableFloatSpeedVector(List<Float> values,
SpeedUnit unit,
StorageType storageType)
Construct a new Relative Immutable Float SpeedVector.
|
MutableFloatSpeedVector(List<FloatSpeed> values,
StorageType storageType)
Construct a new Relative Immutable Float SpeedVector.
|
MutableFloatSpeedVector(SortedMap<Integer,Float> values,
SpeedUnit unit,
int length,
StorageType storageType)
Construct a new Relative Immutable Float SpeedVector.
|
MutableFloatSpeedVector(SortedMap<Integer,FloatSpeed> values,
int length,
StorageType storageType)
Construct a new Relative Immutable Float SpeedVector.
|
Modifier and Type | Method and Description |
---|---|
protected MutableFloatSpeedVector |
instantiateMutableType(FloatVectorData dvd,
SpeedUnit unit)
Construct a new Relative Mutable FloatVector of the right type.
|
protected FloatSpeed |
instantiateScalar(float value,
SpeedUnit unit)
Construct a new Relative Immutable FloatScalar of the right type.
|
protected FloatSpeedVector |
instantiateType(FloatVectorData dvd,
SpeedUnit unit)
Construct a new Relative Immutable FloatVector of the right type.
|
FloatSpeed[] |
toArray()
Return an array of FloatSpeed Scalars from this vector.
|
MutableFloatSpeedVector |
toDense()
return a dense version of this vector.
|
MutableFloatSpeedVector |
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 MutableFloatSpeedVector(float[] values, SpeedUnit unit, StorageType storageType) throws ValueException
values
- float[]; the values of the entries in the new Relative Immutable Float SpeedVectorunit
- SpeedUnit; the unit of the new Relative Immutable Float SpeedVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic MutableFloatSpeedVector(List<Float> values, SpeedUnit unit, StorageType storageType) throws ValueException
values
- List<Float>; the values of the entries in the new Relative Immutable Float SpeedVectorunit
- SpeedUnit; the unit of the new Relative Immutable Float SpeedVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic MutableFloatSpeedVector(FloatSpeed[] values, StorageType storageType) throws ValueException
values
- FloatSpeed[]; the values of the entries in the new Relative Immutable Float SpeedVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic MutableFloatSpeedVector(List<FloatSpeed> values, StorageType storageType) throws ValueException
values
- List<FloatSpeed>; the values of the entries in the new Relative Immutable Float SpeedVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic MutableFloatSpeedVector(SortedMap<Integer,FloatSpeed> values, int length, StorageType storageType) throws ValueException
values
- SortedMap<Integer, FloatSpeed>; the values of the entries in the new Relative Sparse Mutable Float
SpeedVectorlength
- int; the size of the vectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic MutableFloatSpeedVector(SortedMap<Integer,Float> values, SpeedUnit unit, int length, StorageType storageType) throws ValueException
values
- SortedMap<Integer, Float>; the map of indexes to values of the Relative Sparse Mutable Float
SpeedVectorunit
- SpeedUnit; the unit of the new Relative Sparse Mutable Float SpeedVectorlength
- int; the size of the vectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullMutableFloatSpeedVector(FloatVectorData data, SpeedUnit unit)
data
- FloatVectorData; an internal data objectunit
- SpeedUnit; the unitprotected final FloatSpeedVector instantiateType(FloatVectorData dvd, SpeedUnit unit)
instantiateType
in class AbstractFloatVectorRel<SpeedUnit,FloatSpeedVector,MutableFloatSpeedVector,FloatSpeed>
dvd
- FloatVectorData; an internal data objectunit
- U; the unitprotected final MutableFloatSpeedVector instantiateMutableType(FloatVectorData dvd, SpeedUnit unit)
instantiateMutableType
in class AbstractFloatVectorRel<SpeedUnit,FloatSpeedVector,MutableFloatSpeedVector,FloatSpeed>
dvd
- FloatVectorData; an internal data objectunit
- U; the unitprotected final FloatSpeed instantiateScalar(float value, SpeedUnit unit)
instantiateScalar
in class AbstractFloatVectorRel<SpeedUnit,FloatSpeedVector,MutableFloatSpeedVector,FloatSpeed>
value
- float; the valueunit
- U; the unitpublic final MutableFloatSpeedVector toDense()
public final MutableFloatSpeedVector toSparse()
public FloatSpeed[] toArray()
RuntimeException
- wrapping a ValueException on error getting one of the valuesCopyright © 2015–2019 Delft University of Technology. All rights reserved.