public class MutableFloatPositionVector extends AbstractMutableFloatVectorAbs<PositionUnit,LengthUnit,FloatPositionVector,FloatLengthVector,MutableFloatPositionVector,FloatPosition>
Copyright (c) 2013-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUNITS License.
$LastChangedDate: 2015-09-29 14:14:28 +0200 (Tue, 29 Sep 2015) $, @version $Revision: 73 $, by $Author: pknoppers $, initial
version Sep 5, 2015
AbstractFloatVectorAbs.Itr
data
Constructor and Description |
---|
MutableFloatPositionVector(float[] values,
PositionUnit unit,
StorageType storageType)
Construct a new Absolute Mutable FloatPositionVector.
|
MutableFloatPositionVector(FloatPosition[] values,
StorageType storageType)
Construct a new Absolute Mutable FloatPositionVector.
|
MutableFloatPositionVector(FloatVectorData data,
PositionUnit unit)
Construct a new Absolute Mutable FloatPositionVector.
|
MutableFloatPositionVector(List<Float> values,
PositionUnit unit,
StorageType storageType)
Construct a new Absolute Mutable FloatPositionVector.
|
MutableFloatPositionVector(List<FloatPosition> values,
StorageType storageType)
Construct a new Absolute Mutable FloatPositionVector.
|
MutableFloatPositionVector(SortedMap<Integer,Float> values,
PositionUnit unit,
int length,
StorageType storageType)
Construct a new Absolute Mutable FloatPositionVector.
|
MutableFloatPositionVector(SortedMap<Integer,FloatPosition> values,
int length,
StorageType storageType)
Construct a new Absolute Mutable FloatPositionVector.
|
Modifier and Type | Method and Description |
---|---|
protected MutableFloatPositionVector |
instantiateMutableType(FloatVectorData dvd,
PositionUnit unit)
Construct a new Absolute Mutable FloatVector of the right type.
|
protected FloatPosition |
instantiateScalar(float value,
PositionUnit unit)
Construct a new Absolute Immutable FloatScalar of the right type.
|
protected FloatPositionVector |
instantiateTypeAbs(FloatVectorData dvd,
PositionUnit unit)
Construct a new Absolute Immutable FloatVector of the right type.
|
protected FloatLengthVector |
instantiateTypeRel(FloatVectorData dvd,
LengthUnit unit)
Construct a new Relative Immutable FloatVector of the right type.
|
FloatPosition[] |
toArray()
Return an array of FloatPosition Scalars from this vector.
|
MutableFloatPositionVector |
toDense()
return a dense version of this vector.
|
MutableFloatPositionVector |
toSparse()
return a sparse version of this vector.
|
assign, ceil, checkCopyOnWrite, copy, decrementBy, decrementBy, decrementBy, divideBy, floor, immutable, incrementBy, incrementBy, incrementBy, multiplyBy, multiplyBy, mutable, normalize, rint, round, set, setCopyOnWrite, setInUnit, setSI
checkUnit, checkUnit, checkUnit, get, iterator, minus, minus, plus
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 MutableFloatPositionVector(float[] values, PositionUnit unit, StorageType storageType) throws ValueException
values
- float[]; the values of the entries in the new Absolute Mutable FloatPositionVectorunit
- U; the unit of the new Absolute Mutable FloatPositionVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic MutableFloatPositionVector(List<Float> values, PositionUnit unit, StorageType storageType) throws ValueException
values
- List; the values of the entries in the new Absolute Mutable FloatPositionVectorunit
- U; the unit of the new Absolute Mutable FloatPositionVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic MutableFloatPositionVector(FloatPosition[] values, StorageType storageType) throws ValueException
values
- FloatScalar.Rel<U>[]; the values of the entries in the new Absolute Mutable FloatPositionVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic MutableFloatPositionVector(List<FloatPosition> values, StorageType storageType) throws ValueException
values
- List; the values of the entries in the new Absolute Mutable FloatPositionVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic MutableFloatPositionVector(SortedMap<Integer,FloatPosition> values, int length, StorageType storageType) throws ValueException
values
- FloatScalar.Rel<U>[]; the values of the entries in the new Absolute Sparse Mutable
FloatPositionVectorlength
- the size of the vectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic MutableFloatPositionVector(SortedMap<Integer,Float> values, PositionUnit unit, int length, StorageType storageType) throws ValueException
values
- Map; the map of indexes to values of the Absolute Sparse Mutable FloatPositionVectorunit
- U; the unit of the new Absolute Sparse Mutable FloatPositionVectorlength
- the size of the vectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullMutableFloatPositionVector(FloatVectorData data, PositionUnit unit)
data
- an internal data objectunit
- the unitprotected final FloatPositionVector instantiateTypeAbs(FloatVectorData dvd, PositionUnit unit)
instantiateTypeAbs
in class AbstractFloatVectorAbs<PositionUnit,LengthUnit,FloatPositionVector,FloatLengthVector,MutableFloatPositionVector,FloatPosition>
dvd
- an internal data objectunit
- the unitprotected final FloatLengthVector instantiateTypeRel(FloatVectorData dvd, LengthUnit unit)
instantiateTypeRel
in class AbstractFloatVectorAbs<PositionUnit,LengthUnit,FloatPositionVector,FloatLengthVector,MutableFloatPositionVector,FloatPosition>
dvd
- an internal data objectunit
- the unitprotected final MutableFloatPositionVector instantiateMutableType(FloatVectorData dvd, PositionUnit unit)
instantiateMutableType
in class AbstractFloatVectorAbs<PositionUnit,LengthUnit,FloatPositionVector,FloatLengthVector,MutableFloatPositionVector,FloatPosition>
dvd
- an internal data objectunit
- the unitprotected final FloatPosition instantiateScalar(float value, PositionUnit unit)
instantiateScalar
in class AbstractFloatVectorAbs<PositionUnit,LengthUnit,FloatPositionVector,FloatLengthVector,MutableFloatPositionVector,FloatPosition>
value
- the valueunit
- the unitpublic final MutableFloatPositionVector toDense()
public final MutableFloatPositionVector toSparse()
public FloatPosition[] toArray()
RuntimeException
- wrapping a ValueException on error getting one of the valuesCopyright © 2015–2018 Delft University of Technology. All rights reserved.