public class MutableFloatDirectionVector extends AbstractMutableFloatVectorAbs<DirectionUnit,AngleUnit,FloatDirectionVector,FloatAngleVector,MutableFloatDirectionVector,FloatDirection>
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 |
---|
MutableFloatDirectionVector(float[] values,
DirectionUnit unit,
StorageType storageType)
Construct a new Absolute Mutable FloatDirectionVector.
|
MutableFloatDirectionVector(FloatDirection[] values,
StorageType storageType)
Construct a new Absolute Mutable FloatDirectionVector.
|
MutableFloatDirectionVector(FloatVectorData data,
DirectionUnit unit)
Construct a new Absolute Mutable FloatDirectionVector.
|
MutableFloatDirectionVector(List<Float> values,
DirectionUnit unit,
StorageType storageType)
Construct a new Absolute Mutable FloatDirectionVector.
|
MutableFloatDirectionVector(List<FloatDirection> values,
StorageType storageType)
Construct a new Absolute Mutable FloatDirectionVector.
|
MutableFloatDirectionVector(SortedMap<Integer,Float> values,
DirectionUnit unit,
int length,
StorageType storageType)
Construct a new Absolute Mutable FloatDirectionVector.
|
MutableFloatDirectionVector(SortedMap<Integer,FloatDirection> values,
int length,
StorageType storageType)
Construct a new Absolute Mutable 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.
|
MutableFloatDirectionVector |
toDense()
return a dense version of this vector.
|
MutableFloatDirectionVector |
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 MutableFloatDirectionVector(float[] values, DirectionUnit unit, StorageType storageType) throws ValueException
values
- float[]; the values of the entries in the new Absolute Mutable FloatDirectionVectorunit
- U; the unit of the new Absolute Mutable FloatDirectionVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic MutableFloatDirectionVector(List<Float> values, DirectionUnit unit, StorageType storageType) throws ValueException
values
- List; the values of the entries in the new Absolute Mutable FloatDirectionVectorunit
- U; the unit of the new Absolute Mutable FloatDirectionVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic MutableFloatDirectionVector(FloatDirection[] values, StorageType storageType) throws ValueException
values
- FloatScalar.Rel<U>[]; the values of the entries in the new Absolute Mutable FloatDirectionVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic MutableFloatDirectionVector(List<FloatDirection> values, StorageType storageType) throws ValueException
values
- List; the values of the entries in the new Absolute Mutable FloatDirectionVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic MutableFloatDirectionVector(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 MutableFloatDirectionVector(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 nullMutableFloatDirectionVector(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 MutableFloatDirectionVector toDense()
public final MutableFloatDirectionVector toSparse()
public FloatDirection[] toArray()
RuntimeException
- wrapping a ValueException on error getting one of the valuesCopyright © 2015–2018 Delft University of Technology. All rights reserved.