public class LinearDensityVector extends AbstractDoubleVectorRel<LinearDensityUnit,LinearDensityVector,MutableLinearDensityVector,LinearDensity>
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
AbstractDoubleVectorRel.Itrdata| Constructor and Description |
|---|
LinearDensityVector(double[] values,
LinearDensityUnit unit,
StorageType storageType)
Construct a new Relative Immutable Double LinearDensityVector.
|
LinearDensityVector(DoubleVectorData data,
LinearDensityUnit unit) |
LinearDensityVector(LinearDensity[] values,
StorageType storageType)
Construct a new Relative Immutable Double LinearDensityVector.
|
LinearDensityVector(List<Double> values,
LinearDensityUnit unit,
StorageType storageType)
Construct a new Relative Immutable Double LinearDensityVector.
|
LinearDensityVector(List<LinearDensity> values,
StorageType storageType)
Construct a new Relative Immutable Double LinearDensityVector.
|
LinearDensityVector(SortedMap<Integer,Double> values,
LinearDensityUnit unit,
int length,
StorageType storageType)
Construct a new Relative Immutable Double LinearDensityVector.
|
LinearDensityVector(SortedMap<Integer,LinearDensity> values,
int length,
StorageType storageType)
Construct a new Relative Immutable Double LinearDensityVector.
|
| Modifier and Type | Method and Description |
|---|---|
protected MutableLinearDensityVector |
instantiateMutableType(DoubleVectorData dvd,
LinearDensityUnit unit)
Construct a new Relative Mutable DoubleVector of the right type.
|
protected LinearDensity |
instantiateScalar(double value,
LinearDensityUnit unit)
Construct a new Relative Immutable DoubleScalar of the right type.
|
protected LinearDensityVector |
instantiateType(DoubleVectorData dvd,
LinearDensityUnit unit)
Construct a new Relative Immutable DoubleVector of the right type.
|
LinearDensity[] |
toArray()
Return an array of LinearDensity Scalars from this vector.
|
LinearDensityVector |
toDense()
return a dense version of this vector.
|
LinearDensityVector |
toSparse()
return a sparse version of this vector.
|
checkUnit, checkUnit, checkUnit, divide, get, iterator, minus, mutable, plus, timescardinality, checkIndex, checkSize, checkSize, equals, getData, getInUnit, getInUnit, getSI, getStorageType, getValuesInUnit, getValuesInUnit, getValuesSI, hashCode, size, toString, toString, toString, toString, zSumexpressAsSIUnit, expressAsSpecifiedUnit, getUnit, isAbsolute, isRelative, setDisplayUnitclone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic LinearDensityVector(double[] values,
LinearDensityUnit unit,
StorageType storageType)
throws ValueException
values - double[]; the values of the entries in the new Relative Immutable Double LinearDensityVectorunit - LinearDensityUnit; the unit of the new Relative Immutable Double LinearDensityVectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values is nullpublic LinearDensityVector(List<Double> values, LinearDensityUnit unit, StorageType storageType) throws ValueException
values - List<Double>; the values of the entries in the new Relative Immutable Double LinearDensityVectorunit - LinearDensityUnit; the unit of the new Relative Immutable Double LinearDensityVectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values is nullpublic LinearDensityVector(LinearDensity[] values, StorageType storageType) throws ValueException
values - LinearDensity[]; the values of the entries in the new Relative Immutable Double LinearDensityVectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values has zero entriespublic LinearDensityVector(List<LinearDensity> values, StorageType storageType) throws ValueException
values - List<LinearDensity>; the values of the entries in the new Relative Immutable Double
LinearDensityVectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values has zero entriespublic LinearDensityVector(SortedMap<Integer,LinearDensity> values, int length, StorageType storageType) throws ValueException
values - SortedMap<Integer, LinearDensity>; the values of the entries in the new Relative Sparse Mutable
Double LinearDensityVectorlength - int; the size of the vectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values has zero entriespublic LinearDensityVector(SortedMap<Integer,Double> values, LinearDensityUnit unit, int length, StorageType storageType) throws ValueException
values - SortedMap<Integer, Double>; the map of indexes to values of the Relative Sparse Mutable Double
LinearDensityVectorunit - LinearDensityUnit; the unit of the new Relative Sparse Mutable Double LinearDensityVectorlength - int; the size of the vectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values is nullLinearDensityVector(DoubleVectorData data, LinearDensityUnit unit)
data - DoubleVectorData; an internal data objectunit - LinearDensityUnit; the unitprotected final LinearDensityVector instantiateType(DoubleVectorData dvd, LinearDensityUnit unit)
instantiateType in class AbstractDoubleVectorRel<LinearDensityUnit,LinearDensityVector,MutableLinearDensityVector,LinearDensity>dvd - DoubleVectorData; an internal data objectunit - U; the unitprotected final MutableLinearDensityVector instantiateMutableType(DoubleVectorData dvd, LinearDensityUnit unit)
instantiateMutableType in class AbstractDoubleVectorRel<LinearDensityUnit,LinearDensityVector,MutableLinearDensityVector,LinearDensity>dvd - DoubleVectorData; an internal data objectunit - U; the unitprotected final LinearDensity instantiateScalar(double value, LinearDensityUnit unit)
instantiateScalar in class AbstractDoubleVectorRel<LinearDensityUnit,LinearDensityVector,MutableLinearDensityVector,LinearDensity>value - double; the valueunit - U; the unitpublic final LinearDensityVector toDense()
public final LinearDensityVector toSparse()
public LinearDensity[] toArray()
RuntimeException - wrapping a ValueException on error getting one of the valuesCopyright © 2015–2019 Delft University of Technology. All rights reserved.