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