public class FloatDirectionVector extends AbstractFloatVectorAbs<DirectionUnit,AngleUnit,FloatDirectionVector,FloatAngleVector,MutableFloatDirectionVector,FloatDirection>
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 |
---|
FloatDirectionVector(float[] values,
DirectionUnit unit,
StorageType storageType)
Construct a new Absolute Immutable FloatDirectionVector.
|
FloatDirectionVector(FloatDirection[] values,
StorageType storageType)
Construct a new Absolute Immutable FloatDirectionVector.
|
FloatDirectionVector(FloatVectorData data,
DirectionUnit unit)
Construct a new Absolute Immutable FloatDirectionVector.
|
FloatDirectionVector(List<Float> values,
DirectionUnit unit,
StorageType storageType)
Construct a new Absolute Immutable FloatDirectionVector.
|
FloatDirectionVector(List<FloatDirection> values,
StorageType storageType)
Construct a new Absolute Immutable FloatDirectionVector.
|
FloatDirectionVector(SortedMap<Integer,Float> values,
DirectionUnit unit,
int length,
StorageType storageType)
Construct a new Absolute Immutable FloatDirectionVector.
|
FloatDirectionVector(SortedMap<Integer,FloatDirection> values,
int length,
StorageType storageType)
Construct a new Absolute Immutable FloatDirectionVector.
|
Modifier and Type | Method and Description |
---|---|
protected MutableFloatDirectionVector |
instantiateMutableType(FloatVectorData dvd,
DirectionUnit unit)
Construct a new Absolute Mutable FloatVector of the right type.
|
protected FloatDirection |
instantiateScalar(float value,
DirectionUnit unit)
Construct a new Absolute Immutable FloatScalar of the right type.
|
protected FloatDirectionVector |
instantiateTypeAbs(FloatVectorData dvd,
DirectionUnit unit)
Construct a new Absolute Immutable FloatVector of the right type.
|
protected FloatAngleVector |
instantiateTypeRel(FloatVectorData dvd,
AngleUnit unit)
Construct a new Relative Immutable FloatVector of the right type.
|
FloatDirectionVector |
toDense()
return a dense version of this vector.
|
FloatDirectionVector |
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 FloatDirectionVector(float[] values, DirectionUnit unit, StorageType storageType) throws ValueException
values
- float[]; the values of the entries in the new Absolute Immutable FloatDirectionVectorunit
- U; the unit of the new Absolute Immutable FloatDirectionVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic FloatDirectionVector(List<Float> values, DirectionUnit unit, StorageType storageType) throws ValueException
values
- List; the values of the entries in the new Absolute Immutable FloatDirectionVectorunit
- U; the unit of the new Absolute Immutable FloatDirectionVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic FloatDirectionVector(FloatDirection[] values, StorageType storageType) throws ValueException
values
- FloatScalar.Rel<U>[]; the values of the entries in the new Absolute Immutable FloatDirectionVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic FloatDirectionVector(List<FloatDirection> values, StorageType storageType) throws ValueException
values
- List; the values of the entries in the new Absolute Immutable FloatDirectionVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic FloatDirectionVector(SortedMap<Integer,FloatDirection> values, int length, StorageType storageType) throws ValueException
values
- FloatScalar.Rel<U>[]; the values of the entries in the new Absolute Sparse Mutable
FloatDirectionVectorlength
- the size of the vectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic FloatDirectionVector(SortedMap<Integer,Float> values, DirectionUnit unit, int length, StorageType storageType) throws ValueException
values
- Map; the map of indexes to values of the Absolute Sparse Mutable FloatDirectionVectorunit
- U; the unit of the new Absolute Sparse Mutable FloatDirectionVectorlength
- the size of the vectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullFloatDirectionVector(FloatVectorData data, DirectionUnit unit)
data
- an internal data objectunit
- the unitprotected final FloatDirectionVector instantiateTypeAbs(FloatVectorData dvd, DirectionUnit unit)
instantiateTypeAbs
in class AbstractFloatVectorAbs<DirectionUnit,AngleUnit,FloatDirectionVector,FloatAngleVector,MutableFloatDirectionVector,FloatDirection>
dvd
- an internal data objectunit
- the unitprotected final FloatAngleVector instantiateTypeRel(FloatVectorData dvd, AngleUnit unit)
instantiateTypeRel
in class AbstractFloatVectorAbs<DirectionUnit,AngleUnit,FloatDirectionVector,FloatAngleVector,MutableFloatDirectionVector,FloatDirection>
dvd
- an internal data objectunit
- the unitprotected final MutableFloatDirectionVector instantiateMutableType(FloatVectorData dvd, DirectionUnit unit)
instantiateMutableType
in class AbstractFloatVectorAbs<DirectionUnit,AngleUnit,FloatDirectionVector,FloatAngleVector,MutableFloatDirectionVector,FloatDirection>
dvd
- an internal data objectunit
- the unitprotected final FloatDirection instantiateScalar(float value, DirectionUnit unit)
instantiateScalar
in class AbstractFloatVectorAbs<DirectionUnit,AngleUnit,FloatDirectionVector,FloatAngleVector,MutableFloatDirectionVector,FloatDirection>
value
- the valueunit
- the unitpublic final FloatDirectionVector toDense()
public final FloatDirectionVector toSparse()
Copyright © 2015–2017 Delft University of Technology. All rights reserved.