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