public class MutableAreaVector extends AbstractMutableDoubleVectorRel<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 |
|---|
MutableAreaVector(Area[] values,
StorageType storageType)
Construct a new Relative Immutable Double AreaVector.
|
MutableAreaVector(double[] values,
AreaUnit unit,
StorageType storageType)
Construct a new Relative Immutable Double AreaVector.
|
MutableAreaVector(DoubleVectorData data,
AreaUnit unit) |
MutableAreaVector(List<Area> values,
StorageType storageType)
Construct a new Relative Immutable Double AreaVector.
|
MutableAreaVector(List<Double> values,
AreaUnit unit,
StorageType storageType)
Construct a new Relative Immutable Double AreaVector.
|
MutableAreaVector(SortedMap<Integer,Area> values,
int length,
StorageType storageType)
Construct a new Relative Immutable Double AreaVector.
|
MutableAreaVector(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.
|
MutableAreaVector |
toDense()
return a dense version of this vector.
|
MutableAreaVector |
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, setSIcheckUnit, checkUnit, checkUnit, divide, get, iterator, minus, 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, waitDIV, MULT, POWcardinality, get, getInUnit, getInUnit, getSI, getValuesInUnit, getValuesInUnit, getValuesSI, size, toString, toString, toString, toString, zSumforEach, spliteratorpublic MutableAreaVector(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 MutableAreaVector(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 MutableAreaVector(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 MutableAreaVector(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 MutableAreaVector(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 MutableAreaVector(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 nullMutableAreaVector(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 MutableAreaVector toDense()
public final MutableAreaVector toSparse()
public Area[] toArray()
RuntimeException - wrapping a ValueException on error getting one of the valuesCopyright © 2015–2019 Delft University of Technology. All rights reserved.