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