public class FloatLengthVector extends AbstractFloatVectorRel<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 |
---|
FloatLengthVector(float[] values,
LengthUnit unit,
StorageType storageType)
Construct a new Relative Immutable FloatLengthVector.
|
FloatLengthVector(FloatLength[] values,
StorageType storageType)
Construct a new Relative Immutable FloatLengthVector.
|
FloatLengthVector(FloatVectorData data,
LengthUnit unit)
Construct a new Relative Immutable FloatLengthVector.
|
FloatLengthVector(List<Float> values,
LengthUnit unit,
StorageType storageType)
Construct a new Relative Immutable FloatLengthVector.
|
FloatLengthVector(List<FloatLength> values,
StorageType storageType)
Construct a new Relative Immutable FloatLengthVector.
|
FloatLengthVector(SortedMap<Integer,Float> values,
LengthUnit unit,
int length,
StorageType storageType)
Construct a new Relative Immutable FloatLengthVector.
|
FloatLengthVector(SortedMap<Integer,FloatLength> values,
int length,
StorageType storageType)
Construct a new Relative Immutable 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.
|
FloatLengthVector |
toDense()
return a dense version of this vector.
|
FloatLengthVector |
toSparse()
return a sparse version of this vector.
|
checkUnit, checkUnit, checkUnit, divide, get, iterator, minus, mutable, 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
forEach, spliterator
public FloatLengthVector(float[] values, LengthUnit unit, StorageType storageType) throws ValueException
values
- float[]; the values of the entries in the new Relative Immutable FloatLengthVectorunit
- LengthUnit; the unit of the new Relative Immutable FloatLengthVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic FloatLengthVector(List<Float> values, LengthUnit unit, StorageType storageType) throws ValueException
values
- List<Float>; the values of the entries in the new Relative Immutable FloatLengthVectorunit
- LengthUnit; the unit of the new Relative Immutable FloatLengthVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic FloatLengthVector(FloatLength[] values, StorageType storageType) throws ValueException
values
- FloatLength[]; the values of the entries in the new Relative Immutable FloatLengthVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic FloatLengthVector(List<FloatLength> values, StorageType storageType) throws ValueException
values
- List<FloatLength>; the values of the entries in the new Relative Immutable FloatLengthVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic FloatLengthVector(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 FloatLengthVector(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 nullFloatLengthVector(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 FloatLengthVector toDense()
public final FloatLengthVector toSparse()
public FloatLength[] toArray()
RuntimeException
- wrapping a ValueException on error getting one of the valuesCopyright © 2015–2019 Delft University of Technology. All rights reserved.