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