public class FloatPositionVector extends AbstractFloatVectorAbs<PositionUnit,LengthUnit,FloatPositionVector,FloatLengthVector,MutableFloatPositionVector,FloatPosition>
Copyright (c) 2013-2017 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
data
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.
|
FloatPositionVector |
toDense()
return a dense version of this vector.
|
FloatPositionVector |
toSparse()
return a sparse version of this vector.
|
checkUnit, checkUnit, checkUnit, get, minus, minus, mutable, 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
public FloatPositionVector(float[] values, PositionUnit unit, StorageType storageType) throws ValueException
values
- float[]; the values of the entries in the new Absolute Immutable FloatPositionVectorunit
- U; the unit of the new Absolute Immutable FloatPositionVectorstorageType
- 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; the values of the entries in the new Absolute Immutable FloatPositionVectorunit
- U; the unit of the new Absolute Immutable FloatPositionVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic FloatPositionVector(FloatPosition[] values, StorageType storageType) throws ValueException
values
- FloatScalar.Rel<U>[]; the values of the entries in the new Absolute Immutable FloatPositionVectorstorageType
- 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; the values of the entries in the new Absolute Immutable FloatPositionVectorstorageType
- 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
- 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 FloatPositionVector(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 nullFloatPositionVector(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 FloatPositionVector toDense()
public final FloatPositionVector toSparse()
Copyright © 2015–2017 Delft University of Technology. All rights reserved.