public class MutableFloatDensityVector extends AbstractMutableFloatVectorRel<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 |
|---|
MutableFloatDensityVector(float[] values,
DensityUnit unit,
StorageType storageType)
Construct a new Relative Immutable Float DensityVector.
|
MutableFloatDensityVector(FloatDensity[] values,
StorageType storageType)
Construct a new Relative Immutable Float DensityVector.
|
MutableFloatDensityVector(FloatVectorData data,
DensityUnit unit) |
MutableFloatDensityVector(List<Float> values,
DensityUnit unit,
StorageType storageType)
Construct a new Relative Immutable Float DensityVector.
|
MutableFloatDensityVector(List<FloatDensity> values,
StorageType storageType)
Construct a new Relative Immutable Float DensityVector.
|
MutableFloatDensityVector(SortedMap<Integer,Float> values,
DensityUnit unit,
int length,
StorageType storageType)
Construct a new Relative Immutable Float DensityVector.
|
MutableFloatDensityVector(SortedMap<Integer,FloatDensity> values,
int length,
StorageType storageType)
Construct a new Relative Immutable Float DensityVector.
|
| 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.
|
MutableFloatDensityVector |
toDense()
return a dense version of this vector.
|
MutableFloatDensityVector |
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, setSIcheckUnit, checkUnit, checkUnit, divide, get, iterator, minus, 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, waitDIV, MULT, POWcardinality, getInUnit, getInUnit, getSI, getValuesInUnit, getValuesInUnit, getValuesSI, size, toString, toString, toString, toString, zSumforEach, spliteratorpublic MutableFloatDensityVector(float[] values,
DensityUnit unit,
StorageType storageType)
throws ValueException
values - float[]; the values of the entries in the new Relative Immutable Float DensityVectorunit - DensityUnit; the unit of the new Relative Immutable Float DensityVectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values is nullpublic MutableFloatDensityVector(List<Float> values, DensityUnit unit, StorageType storageType) throws ValueException
values - List<Float>; the values of the entries in the new Relative Immutable Float DensityVectorunit - DensityUnit; the unit of the new Relative Immutable Float DensityVectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values is nullpublic MutableFloatDensityVector(FloatDensity[] values, StorageType storageType) throws ValueException
values - FloatDensity[]; the values of the entries in the new Relative Immutable Float DensityVectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values has zero entriespublic MutableFloatDensityVector(List<FloatDensity> values, StorageType storageType) throws ValueException
values - List<FloatDensity>; the values of the entries in the new Relative Immutable Float DensityVectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values has zero entriespublic MutableFloatDensityVector(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
DensityVectorlength - int; the size of the vectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values has zero entriespublic MutableFloatDensityVector(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
DensityVectorunit - DensityUnit; the unit of the new Relative Sparse Mutable Float DensityVectorlength - int; the size of the vectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values is nullMutableFloatDensityVector(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 MutableFloatDensityVector toDense()
public final MutableFloatDensityVector toSparse()
public FloatDensity[] toArray()
RuntimeException - wrapping a ValueException on error getting one of the valuesCopyright © 2015–2019 Delft University of Technology. All rights reserved.