public class MutableFloatLengthVector extends AbstractMutableFloatVectorRel<LengthUnit,FloatLengthVector,MutableFloatLengthVector,FloatLength>
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
AbstractFloatVectorRel.Itr
data
Constructor and Description |
---|
MutableFloatLengthVector(float[] values,
LengthUnit unit,
StorageType storageType)
Construct a new Relative Mutable FloatLengthVector.
|
MutableFloatLengthVector(FloatLength[] values,
StorageType storageType)
Construct a new Relative Mutable FloatLengthVector.
|
MutableFloatLengthVector(FloatVectorData data,
LengthUnit unit)
Construct a new Relative Mutable FloatLengthVector.
|
MutableFloatLengthVector(List<Float> values,
LengthUnit unit,
StorageType storageType)
Construct a new Relative Mutable FloatLengthVector.
|
MutableFloatLengthVector(List<FloatLength> values,
StorageType storageType)
Construct a new Relative Mutable FloatLengthVector.
|
MutableFloatLengthVector(SortedMap<Integer,Float> values,
LengthUnit unit,
int length,
StorageType storageType)
Construct a new Relative Mutable FloatLengthVector.
|
MutableFloatLengthVector(SortedMap<Integer,FloatLength> values,
int length,
StorageType storageType)
Construct a new Relative Mutable FloatLengthVector.
|
Modifier and Type | Method and Description |
---|---|
protected MutableFloatLengthVector |
instantiateMutableType(FloatVectorData dvd,
LengthUnit unit)
Construct a new Relative Mutable FloatVector of the right type.
|
protected FloatLength |
instantiateScalar(float value,
LengthUnit unit)
Construct a new Relative Immutable FloatScalar of the right type.
|
protected FloatLengthVector |
instantiateType(FloatVectorData dvd,
LengthUnit unit)
Construct a new Relative Immutable FloatVector of the right type.
|
FloatLength[] |
toArray()
Return an array of FloatLength Scalars from this vector.
|
MutableFloatLengthVector |
toDense()
return a dense version of this vector.
|
MutableFloatLengthVector |
toSparse()
return a sparse version of this vector.
|
abs, assign, ceil, checkCopyOnWrite, copy, decrementBy, decrementBy, decrementBy, divideBy, divideBy, divideBy, floor, immutable, incrementBy, incrementBy, incrementBy, multiplyBy, multiplyBy, multiplyBy, mutable, neg, normalize, rint, round, set, setCopyOnWrite, setInUnit, setSI
checkUnit, checkUnit, checkUnit, divide, get, iterator, minus, plus, times
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 MutableFloatLengthVector(float[] values, LengthUnit unit, StorageType storageType) throws ValueException
values
- float[]; the values of the entries in the new Relative Mutable FloatLengthVectorunit
- LengthUnit; the unit of the new Relative Mutable FloatLengthVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic MutableFloatLengthVector(List<Float> values, LengthUnit unit, StorageType storageType) throws ValueException
values
- List<Float>; the values of the entries in the new Relative Mutable FloatLengthVectorunit
- LengthUnit; the unit of the new Relative Mutable FloatLengthVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic MutableFloatLengthVector(FloatLength[] values, StorageType storageType) throws ValueException
values
- FloatLength[]; the values of the entries in the new Relative Mutable FloatLengthVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic MutableFloatLengthVector(List<FloatLength> values, StorageType storageType) throws ValueException
values
- List<FloatLength>; the values of the entries in the new Relative Mutable FloatLengthVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic MutableFloatLengthVector(SortedMap<Integer,FloatLength> values, int length, StorageType storageType) throws ValueException
values
- SortedMap<Integer, FloatLength>; the values of the entries in the new Relative Sparse Mutable
FloatLengthVectorlength
- int; the size of the vectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic MutableFloatLengthVector(SortedMap<Integer,Float> values, LengthUnit unit, int length, StorageType storageType) throws ValueException
values
- SortedMap<Integer, Float>; the map of indexes to values of the Relative Sparse Mutable
FloatLengthVectorunit
- LengthUnit; the unit of the new Relative Sparse Mutable FloatLengthVectorlength
- int; the size of the vectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullMutableFloatLengthVector(FloatVectorData data, LengthUnit unit)
data
- FloatVectorData; an internal data objectunit
- LengthUnit; the unitprotected final FloatLengthVector instantiateType(FloatVectorData dvd, LengthUnit unit)
instantiateType
in class AbstractFloatVectorRel<LengthUnit,FloatLengthVector,MutableFloatLengthVector,FloatLength>
dvd
- FloatVectorData; an internal data objectunit
- U; the unitprotected final MutableFloatLengthVector instantiateMutableType(FloatVectorData dvd, LengthUnit unit)
instantiateMutableType
in class AbstractFloatVectorRel<LengthUnit,FloatLengthVector,MutableFloatLengthVector,FloatLength>
dvd
- FloatVectorData; an internal data objectunit
- U; the unitprotected final FloatLength instantiateScalar(float value, LengthUnit unit)
instantiateScalar
in class AbstractFloatVectorRel<LengthUnit,FloatLengthVector,MutableFloatLengthVector,FloatLength>
value
- float; the valueunit
- U; the unitpublic final MutableFloatLengthVector toDense()
public final MutableFloatLengthVector toSparse()
public FloatLength[] toArray()
RuntimeException
- wrapping a ValueException on error getting one of the valuesCopyright © 2015–2019 Delft University of Technology. All rights reserved.