public class FloatSpeedVector extends AbstractFloatVectorRel<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.Itrdata| Constructor and Description |
|---|
FloatSpeedVector(float[] values,
SpeedUnit unit,
StorageType storageType)
Construct a new Relative Immutable Float FloatSpeedVector.
|
FloatSpeedVector(FloatSpeed[] values,
StorageType storageType)
Construct a new Relative Immutable Float FloatSpeedVector.
|
FloatSpeedVector(FloatVectorData data,
SpeedUnit unit) |
FloatSpeedVector(List<Float> values,
SpeedUnit unit,
StorageType storageType)
Construct a new Relative Immutable Float FloatSpeedVector.
|
FloatSpeedVector(List<FloatSpeed> values,
StorageType storageType)
Construct a new Relative Immutable Float FloatSpeedVector.
|
FloatSpeedVector(SortedMap<Integer,Float> values,
SpeedUnit unit,
int length,
StorageType storageType)
Construct a new Relative Immutable Float FloatSpeedVector.
|
FloatSpeedVector(SortedMap<Integer,FloatSpeed> values,
int length,
StorageType storageType)
Construct a new Relative Immutable Float FloatSpeedVector.
|
| 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.
|
FloatSpeedVector |
toDense()
return a dense version of this vector.
|
FloatSpeedVector |
toSparse()
return a sparse version of this vector.
|
checkUnit, checkUnit, checkUnit, divide, get, iterator, minus, mutable, plus, timescardinality, checkIndex, checkSize, checkSize, equals, getData, getInUnit, getInUnit, getSI, getStorageType, getValuesInUnit, getValuesInUnit, getValuesSI, hashCode, size, toString, toString, toString, toString, zSumexpressAsSIUnit, expressAsSpecifiedUnit, getUnit, isAbsolute, isRelative, setDisplayUnitclone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic FloatSpeedVector(float[] values,
SpeedUnit unit,
StorageType storageType)
throws ValueException
values - float[]; the values of the entries in the new Relative Immutable Float FloatSpeedVectorunit - SpeedUnit; the unit of the new Relative Immutable Float FloatSpeedVectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values is nullpublic FloatSpeedVector(List<Float> values, SpeedUnit unit, StorageType storageType) throws ValueException
values - List<Float>; the values of the entries in the new Relative Immutable Float FloatSpeedVectorunit - SpeedUnit; the unit of the new Relative Immutable Float FloatSpeedVectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values is nullpublic FloatSpeedVector(FloatSpeed[] values, StorageType storageType) throws ValueException
values - FloatSpeed[]; the values of the entries in the new Relative Immutable Float FloatSpeedVectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values has zero entriespublic FloatSpeedVector(List<FloatSpeed> values, StorageType storageType) throws ValueException
values - List<FloatSpeed>; the values of the entries in the new Relative Immutable Float FloatSpeedVectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values has zero entriespublic FloatSpeedVector(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
FloatSpeedVectorlength - int; the size of the vectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values has zero entriespublic FloatSpeedVector(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
FloatSpeedVectorunit - SpeedUnit; the unit of the new Relative Sparse Mutable Float FloatSpeedVectorlength - int; the size of the vectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values is nullFloatSpeedVector(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 FloatSpeedVector toDense()
public final FloatSpeedVector toSparse()
public FloatSpeed[] toArray()
RuntimeException - wrapping a ValueException on error getting one of the valuesCopyright © 2015–2019 Delft University of Technology. All rights reserved.