public class MutableFloatLinearDensityVector extends AbstractMutableFloatVectorRel<LinearDensityUnit,FloatLinearDensityVector,MutableFloatLinearDensityVector,FloatLinearDensity>
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 |
---|
MutableFloatLinearDensityVector(float[] values,
LinearDensityUnit unit,
StorageType storageType)
Construct a new Relative Immutable Float LinearDensityVector.
|
MutableFloatLinearDensityVector(FloatLinearDensity[] values,
StorageType storageType)
Construct a new Relative Immutable Float LinearDensityVector.
|
MutableFloatLinearDensityVector(FloatVectorData data,
LinearDensityUnit unit) |
MutableFloatLinearDensityVector(List<Float> values,
LinearDensityUnit unit,
StorageType storageType)
Construct a new Relative Immutable Float LinearDensityVector.
|
MutableFloatLinearDensityVector(List<FloatLinearDensity> values,
StorageType storageType)
Construct a new Relative Immutable Float LinearDensityVector.
|
MutableFloatLinearDensityVector(SortedMap<Integer,Float> values,
LinearDensityUnit unit,
int length,
StorageType storageType)
Construct a new Relative Immutable Float LinearDensityVector.
|
MutableFloatLinearDensityVector(SortedMap<Integer,FloatLinearDensity> values,
int length,
StorageType storageType)
Construct a new Relative Immutable Float LinearDensityVector.
|
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.
|
MutableFloatLinearDensityVector |
toDense()
return a dense version of this vector.
|
MutableFloatLinearDensityVector |
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 MutableFloatLinearDensityVector(float[] values, LinearDensityUnit unit, StorageType storageType) throws ValueException
values
- float[]; the values of the entries in the new Relative Immutable Float LinearDensityVectorunit
- LinearDensityUnit; the unit of the new Relative Immutable Float LinearDensityVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic MutableFloatLinearDensityVector(List<Float> values, LinearDensityUnit unit, StorageType storageType) throws ValueException
values
- List<Float>; the values of the entries in the new Relative Immutable Float LinearDensityVectorunit
- LinearDensityUnit; the unit of the new Relative Immutable Float LinearDensityVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic MutableFloatLinearDensityVector(FloatLinearDensity[] values, StorageType storageType) throws ValueException
values
- FloatLinearDensity[]; the values of the entries in the new Relative Immutable Float LinearDensityVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic MutableFloatLinearDensityVector(List<FloatLinearDensity> values, StorageType storageType) throws ValueException
values
- List<FloatLinearDensity>; the values of the entries in the new Relative Immutable Float
LinearDensityVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic MutableFloatLinearDensityVector(SortedMap<Integer,FloatLinearDensity> values, int length, StorageType storageType) throws ValueException
values
- SortedMap<Integer, FloatLinearDensity>; the values of the entries in the new Relative Sparse Mutable
Float LinearDensityVectorlength
- int; the size of the vectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic MutableFloatLinearDensityVector(SortedMap<Integer,Float> values, LinearDensityUnit unit, int length, StorageType storageType) throws ValueException
values
- SortedMap<Integer, Float>; the map of indexes to values of the Relative Sparse Mutable Float
LinearDensityVectorunit
- LinearDensityUnit; the unit of the new Relative Sparse Mutable Float LinearDensityVectorlength
- int; the size of the vectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullMutableFloatLinearDensityVector(FloatVectorData data, LinearDensityUnit unit)
data
- FloatVectorData; an internal data objectunit
- LinearDensityUnit; the unitprotected final FloatLinearDensityVector instantiateType(FloatVectorData dvd, LinearDensityUnit unit)
instantiateType
in class AbstractFloatVectorRel<LinearDensityUnit,FloatLinearDensityVector,MutableFloatLinearDensityVector,FloatLinearDensity>
dvd
- FloatVectorData; an internal data objectunit
- U; the unitprotected final MutableFloatLinearDensityVector instantiateMutableType(FloatVectorData dvd, LinearDensityUnit unit)
instantiateMutableType
in class AbstractFloatVectorRel<LinearDensityUnit,FloatLinearDensityVector,MutableFloatLinearDensityVector,FloatLinearDensity>
dvd
- FloatVectorData; an internal data objectunit
- U; the unitprotected final FloatLinearDensity instantiateScalar(float value, LinearDensityUnit unit)
instantiateScalar
in class AbstractFloatVectorRel<LinearDensityUnit,FloatLinearDensityVector,MutableFloatLinearDensityVector,FloatLinearDensity>
value
- float; the valueunit
- U; the unitpublic final MutableFloatLinearDensityVector toDense()
public final MutableFloatLinearDensityVector toSparse()
public FloatLinearDensity[] toArray()
RuntimeException
- wrapping a ValueException on error getting one of the valuesCopyright © 2015–2019 Delft University of Technology. All rights reserved.