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