public class AreaVector extends AbstractDoubleVectorRel<AreaUnit,AreaVector,MutableAreaVector,Area>
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 |
|---|
AreaVector(Area[] values,
StorageType storageType)
Construct a new Relative Immutable Double AreaVector.
|
AreaVector(double[] values,
AreaUnit unit,
StorageType storageType)
Construct a new Relative Immutable Double AreaVector.
|
AreaVector(DoubleVectorData data,
AreaUnit unit) |
AreaVector(List<Area> values,
StorageType storageType)
Construct a new Relative Immutable Double AreaVector.
|
AreaVector(List<Double> values,
AreaUnit unit,
StorageType storageType)
Construct a new Relative Immutable Double AreaVector.
|
AreaVector(SortedMap<Integer,Area> values,
int length,
StorageType storageType)
Construct a new Relative Immutable Double AreaVector.
|
AreaVector(SortedMap<Integer,Double> values,
AreaUnit unit,
int length,
StorageType storageType)
Construct a new Relative Immutable Double AreaVector.
|
| Modifier and Type | Method and Description |
|---|---|
protected MutableAreaVector |
instantiateMutableType(DoubleVectorData dvd,
AreaUnit unit)
Construct a new Relative Mutable DoubleVector of the right type.
|
protected Area |
instantiateScalar(double value,
AreaUnit unit)
Construct a new Relative Immutable DoubleScalar of the right type.
|
protected AreaVector |
instantiateType(DoubleVectorData dvd,
AreaUnit unit)
Construct a new Relative Immutable DoubleVector of the right type.
|
Area[] |
toArray()
Return an array of Area Scalars from this vector.
|
AreaVector |
toDense()
return a dense version of this vector.
|
AreaVector |
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 AreaVector(double[] values,
AreaUnit unit,
StorageType storageType)
throws ValueException
values - double[]; the values of the entries in the new Relative Immutable Double AreaVectorunit - AreaUnit; the unit of the new Relative Immutable Double AreaVectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values is nullpublic AreaVector(List<Double> values, AreaUnit unit, StorageType storageType) throws ValueException
values - List<Double>; the values of the entries in the new Relative Immutable Double AreaVectorunit - AreaUnit; the unit of the new Relative Immutable Double AreaVectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values is nullpublic AreaVector(Area[] values, StorageType storageType) throws ValueException
values - Area[]; the values of the entries in the new Relative Immutable Double AreaVectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values has zero entriespublic AreaVector(List<Area> values, StorageType storageType) throws ValueException
values - List<Area>; the values of the entries in the new Relative Immutable Double AreaVectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values has zero entriespublic AreaVector(SortedMap<Integer,Area> values, int length, StorageType storageType) throws ValueException
values - SortedMap<Integer, Area>; the values of the entries in the new Relative Sparse Mutable Double
AreaVectorlength - int; the size of the vectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values has zero entriespublic AreaVector(SortedMap<Integer,Double> values, AreaUnit unit, int length, StorageType storageType) throws ValueException
values - SortedMap<Integer, Double>; the map of indexes to values of the Relative Sparse Mutable Double
AreaVectorunit - AreaUnit; the unit of the new Relative Sparse Mutable Double AreaVectorlength - int; the size of the vectorstorageType - StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException - when values is nullAreaVector(DoubleVectorData data, AreaUnit unit)
data - DoubleVectorData; an internal data objectunit - AreaUnit; the unitprotected final AreaVector instantiateType(DoubleVectorData dvd, AreaUnit unit)
instantiateType in class AbstractDoubleVectorRel<AreaUnit,AreaVector,MutableAreaVector,Area>dvd - DoubleVectorData; an internal data objectunit - U; the unitprotected final MutableAreaVector instantiateMutableType(DoubleVectorData dvd, AreaUnit unit)
instantiateMutableType in class AbstractDoubleVectorRel<AreaUnit,AreaVector,MutableAreaVector,Area>dvd - DoubleVectorData; an internal data objectunit - U; the unitprotected final Area instantiateScalar(double value, AreaUnit unit)
instantiateScalar in class AbstractDoubleVectorRel<AreaUnit,AreaVector,MutableAreaVector,Area>value - double; the valueunit - U; the unitpublic final AreaVector toDense()
public final AreaVector toSparse()
public Area[] toArray()
RuntimeException - wrapping a ValueException on error getting one of the valuesCopyright © 2015–2019 Delft University of Technology. All rights reserved.