public class FloatPositionVector extends AbstractFloatVectorAbs<PositionUnit,LengthUnit,FloatPositionVector,FloatLengthVector,MutableFloatPositionVector,FloatPosition>
Copyright (c) 2013-2019 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.Itrdata| Constructor and Description |
|---|
FloatPositionVector(float[] values,
PositionUnit unit,
StorageType storageType)
Construct a new Absolute Immutable FloatPositionVector.
|
FloatPositionVector(FloatPosition[] values,
StorageType storageType)
Construct a new Absolute Immutable FloatPositionVector.
|
FloatPositionVector(FloatVectorData data,
PositionUnit unit)
Construct a new Absolute Immutable FloatPositionVector.
|
FloatPositionVector(List<Float> values,
PositionUnit unit,
StorageType storageType)
Construct a new Absolute Immutable FloatPositionVector.
|
FloatPositionVector(List<FloatPosition> values,
StorageType storageType)
Construct a new Absolute Immutable FloatPositionVector.
|
FloatPositionVector(SortedMap<Integer,Float> values,
PositionUnit unit,
int length,
StorageType storageType)
Construct a new Absolute Immutable FloatPositionVector.
|
FloatPositionVector(SortedMap<Integer,FloatPosition> values,
int length,
StorageType storageType)
Construct a new Absolute Immutable 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.
|
FloatPositionVector |
toDense()
return a dense version of this vector.
|
FloatPositionVector |
toSparse()
return a sparse version of this vector.
|
checkUnit, checkUnit, checkUnit, get, iterator, minus, minus, mutable, pluscardinality, checkIndex, checkSize, checkSize, equals, getData, getInUnit, getInUnit, getSI, getStorageType, getValuesInUnit, getValuesInUnit, getValuesSI, hashCode, size, toString, toString, toString, toString, zSumexpressAsSIUnit, expressAsSpecifiedUnit, getUnit, isAbsolute, isRelative, setDisplayUnitclone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic FloatPositionVector(float[] values,
PositionUnit unit,
StorageType storageType)
throws ValueException
values - float[]; the values of the entries in the new Absolute Immutable FloatPositionVectorunit - PositionUnit; the unit of the new Absolute Immutable FloatPositionVectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values is nullpublic FloatPositionVector(List<Float> values, PositionUnit unit, StorageType storageType) throws ValueException
values - List<Float>; the values of the entries in the new Absolute Immutable FloatPositionVectorunit - PositionUnit; the unit of the new Absolute Immutable FloatPositionVectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values is nullpublic FloatPositionVector(FloatPosition[] values, StorageType storageType) throws ValueException
values - FloatPosition[]; the values of the entries in the new Absolute Immutable FloatPositionVectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values has zero entriespublic FloatPositionVector(List<FloatPosition> values, StorageType storageType) throws ValueException
values - List<FloatPosition>; the values of the entries in the new Absolute Immutable FloatPositionVectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values has zero entriespublic FloatPositionVector(SortedMap<Integer,FloatPosition> values, int length, StorageType storageType) throws ValueException
values - SortedMap<Integer, FloatPosition>; the values of the entries in the new Absolute Sparse Mutable
FloatPositionVectorlength - int; the size of the vectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values has zero entriespublic FloatPositionVector(SortedMap<Integer,Float> values, PositionUnit unit, int length, StorageType storageType) throws ValueException
values - SortedMap<Integer, Float>; the map of indexes to values of the Absolute Sparse Mutable
FloatPositionVectorunit - PositionUnit; the unit of the new Absolute Sparse Mutable FloatPositionVectorlength - int; the size of the vectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values is nullFloatPositionVector(FloatVectorData data, PositionUnit unit)
data - FloatVectorData; an internal data objectunit - PositionUnit; the unitprotected final FloatPositionVector instantiateTypeAbs(FloatVectorData dvd, PositionUnit unit)
instantiateTypeAbs in class AbstractFloatVectorAbs<PositionUnit,LengthUnit,FloatPositionVector,FloatLengthVector,MutableFloatPositionVector,FloatPosition>dvd - FloatVectorData; an internal data objectunit - AU; the unitprotected final FloatLengthVector instantiateTypeRel(FloatVectorData dvd, LengthUnit unit)
instantiateTypeRel in class AbstractFloatVectorAbs<PositionUnit,LengthUnit,FloatPositionVector,FloatLengthVector,MutableFloatPositionVector,FloatPosition>dvd - FloatVectorData; an internal data objectunit - RU; the unitprotected final MutableFloatPositionVector instantiateMutableType(FloatVectorData dvd, PositionUnit unit)
instantiateMutableType in class AbstractFloatVectorAbs<PositionUnit,LengthUnit,FloatPositionVector,FloatLengthVector,MutableFloatPositionVector,FloatPosition>dvd - FloatVectorData; an internal data objectunit - AU; the unitprotected final FloatPosition instantiateScalar(float value, PositionUnit unit)
instantiateScalar in class AbstractFloatVectorAbs<PositionUnit,LengthUnit,FloatPositionVector,FloatLengthVector,MutableFloatPositionVector,FloatPosition>value - float; the valueunit - AU; the unitpublic final FloatPositionVector toDense()
public final FloatPositionVector toSparse()
public FloatPosition[] toArray()
RuntimeException - wrapping a ValueException on error getting one of the valuesCopyright © 2015–2019 Delft University of Technology. All rights reserved.