public class FloatDirectionVector extends AbstractFloatVectorAbs<DirectionUnit,AngleUnit,FloatDirectionVector,FloatAngleVector,MutableFloatDirectionVector,FloatDirection>
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.Itr
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.
|
FloatDirection[] |
toArray()
Return an array of FloatDirection Scalars from this vector.
|
FloatDirectionVector |
toDense()
return a dense version of this vector.
|
FloatDirectionVector |
toSparse()
return a sparse version of this vector.
|
checkUnit, checkUnit, checkUnit, get, iterator, 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, setDisplayUnit
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public FloatDirectionVector(float[] values, DirectionUnit unit, StorageType storageType) throws ValueException
values
- float[]; the values of the entries in the new Absolute Immutable FloatDirectionVectorunit
- DirectionUnit; the unit of the new Absolute Immutable FloatDirectionVectorstorageType
- StorageType; 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<Float>; the values of the entries in the new Absolute Immutable FloatDirectionVectorunit
- DirectionUnit; the unit of the new Absolute Immutable FloatDirectionVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic FloatDirectionVector(FloatDirection[] values, StorageType storageType) throws ValueException
values
- FloatDirection[]; the values of the entries in the new Absolute Immutable FloatDirectionVectorstorageType
- StorageType; 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<FloatDirection>; the values of the entries in the new Absolute Immutable FloatDirectionVectorstorageType
- StorageType; 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
- SortedMap<Integer, FloatDirection>; the values of the entries in the new Absolute Sparse Mutable
FloatDirectionVectorlength
- int; the size of the vectorstorageType
- StorageType; 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
- SortedMap<Integer, Float>; the map of indexes to values of the Absolute Sparse Mutable
FloatDirectionVectorunit
- DirectionUnit; the unit of the new Absolute Sparse Mutable FloatDirectionVectorlength
- int; the size of the vectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullFloatDirectionVector(FloatVectorData data, DirectionUnit unit)
data
- FloatVectorData; an internal data objectunit
- DirectionUnit; the unitprotected final FloatDirectionVector instantiateTypeAbs(FloatVectorData dvd, DirectionUnit unit)
instantiateTypeAbs
in class AbstractFloatVectorAbs<DirectionUnit,AngleUnit,FloatDirectionVector,FloatAngleVector,MutableFloatDirectionVector,FloatDirection>
dvd
- FloatVectorData; an internal data objectunit
- AU; the unitprotected final FloatAngleVector instantiateTypeRel(FloatVectorData dvd, AngleUnit unit)
instantiateTypeRel
in class AbstractFloatVectorAbs<DirectionUnit,AngleUnit,FloatDirectionVector,FloatAngleVector,MutableFloatDirectionVector,FloatDirection>
dvd
- FloatVectorData; an internal data objectunit
- RU; the unitprotected final MutableFloatDirectionVector instantiateMutableType(FloatVectorData dvd, DirectionUnit unit)
instantiateMutableType
in class AbstractFloatVectorAbs<DirectionUnit,AngleUnit,FloatDirectionVector,FloatAngleVector,MutableFloatDirectionVector,FloatDirection>
dvd
- FloatVectorData; an internal data objectunit
- AU; the unitprotected final FloatDirection instantiateScalar(float value, DirectionUnit unit)
instantiateScalar
in class AbstractFloatVectorAbs<DirectionUnit,AngleUnit,FloatDirectionVector,FloatAngleVector,MutableFloatDirectionVector,FloatDirection>
value
- float; the valueunit
- AU; the unitpublic final FloatDirectionVector toDense()
public final FloatDirectionVector toSparse()
public FloatDirection[] toArray()
RuntimeException
- wrapping a ValueException on error getting one of the valuesCopyright © 2015–2019 Delft University of Technology. All rights reserved.