public class MutableFloatElectricalCurrentVector extends AbstractMutableFloatVectorRel<ElectricalCurrentUnit,FloatElectricalCurrentVector,MutableFloatElectricalCurrentVector,FloatElectricalCurrent>
Copyright (c) 2013-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
AbstractFloatVectorRel.Itr
data
Constructor and Description |
---|
MutableFloatElectricalCurrentVector(float[] values,
ElectricalCurrentUnit unit,
StorageType storageType)
Construct a new Relative Immutable Float ElectricalCurrentVector.
|
MutableFloatElectricalCurrentVector(FloatElectricalCurrent[] values,
StorageType storageType)
Construct a new Relative Immutable Float ElectricalCurrentVector.
|
MutableFloatElectricalCurrentVector(FloatVectorData data,
ElectricalCurrentUnit unit) |
MutableFloatElectricalCurrentVector(List<Float> values,
ElectricalCurrentUnit unit,
StorageType storageType)
Construct a new Relative Immutable Float ElectricalCurrentVector.
|
MutableFloatElectricalCurrentVector(List<FloatElectricalCurrent> values,
StorageType storageType)
Construct a new Relative Immutable Float ElectricalCurrentVector.
|
MutableFloatElectricalCurrentVector(SortedMap<Integer,Float> values,
ElectricalCurrentUnit unit,
int length,
StorageType storageType)
Construct a new Relative Immutable Float ElectricalCurrentVector.
|
MutableFloatElectricalCurrentVector(SortedMap<Integer,FloatElectricalCurrent> values,
int length,
StorageType storageType)
Construct a new Relative Immutable Float ElectricalCurrentVector.
|
Modifier and Type | Method and Description |
---|---|
protected MutableFloatElectricalCurrentVector |
instantiateMutableType(FloatVectorData dvd,
ElectricalCurrentUnit unit)
Construct a new Relative Mutable FloatVector of the right type.
|
protected FloatElectricalCurrent |
instantiateScalar(float value,
ElectricalCurrentUnit unit)
Construct a new Relative Immutable FloatScalar of the right type.
|
protected FloatElectricalCurrentVector |
instantiateType(FloatVectorData dvd,
ElectricalCurrentUnit unit)
Construct a new Relative Immutable FloatVector of the right type.
|
FloatElectricalCurrent[] |
toArray()
Return an array of FloatElectricalCurrent Scalars from this vector.
|
MutableFloatElectricalCurrentVector |
toDense()
return a dense version of this vector.
|
MutableFloatElectricalCurrentVector |
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 MutableFloatElectricalCurrentVector(float[] values, ElectricalCurrentUnit unit, StorageType storageType) throws ValueException
values
- float[]; the values of the entries in the new Relative Immutable Float ElectricalCurrentVectorunit
- U; the unit of the new Relative Immutable Float ElectricalCurrentVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic MutableFloatElectricalCurrentVector(List<Float> values, ElectricalCurrentUnit unit, StorageType storageType) throws ValueException
values
- List; the values of the entries in the new Relative Immutable Float ElectricalCurrentVectorunit
- U; the unit of the new Relative Immutable Float ElectricalCurrentVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic MutableFloatElectricalCurrentVector(FloatElectricalCurrent[] values, StorageType storageType) throws ValueException
values
- FloatScalar.Rel<U>[]; the values of the entries in the new Relative Immutable Float
ElectricalCurrentVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic MutableFloatElectricalCurrentVector(List<FloatElectricalCurrent> values, StorageType storageType) throws ValueException
values
- List; the values of the entries in the new Relative Immutable Float ElectricalCurrentVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic MutableFloatElectricalCurrentVector(SortedMap<Integer,FloatElectricalCurrent> values, int length, StorageType storageType) throws ValueException
values
- FloatScalar.Rel<U>[]; the values of the entries in the new Relative Sparse Mutable Float
ElectricalCurrentVectorlength
- the size of the vectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic MutableFloatElectricalCurrentVector(SortedMap<Integer,Float> values, ElectricalCurrentUnit unit, int length, StorageType storageType) throws ValueException
values
- Map; the map of indexes to values of the Relative Sparse Mutable Float ElectricalCurrentVectorunit
- U; the unit of the new Relative Sparse Mutable Float ElectricalCurrentVectorlength
- the size of the vectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullMutableFloatElectricalCurrentVector(FloatVectorData data, ElectricalCurrentUnit unit)
data
- an internal data objectunit
- the unitprotected final FloatElectricalCurrentVector instantiateType(FloatVectorData dvd, ElectricalCurrentUnit unit)
instantiateType
in class AbstractFloatVectorRel<ElectricalCurrentUnit,FloatElectricalCurrentVector,MutableFloatElectricalCurrentVector,FloatElectricalCurrent>
dvd
- an internal data objectunit
- the unitprotected final MutableFloatElectricalCurrentVector instantiateMutableType(FloatVectorData dvd, ElectricalCurrentUnit unit)
instantiateMutableType
in class AbstractFloatVectorRel<ElectricalCurrentUnit,FloatElectricalCurrentVector,MutableFloatElectricalCurrentVector,FloatElectricalCurrent>
dvd
- an internal data objectunit
- the unitprotected final FloatElectricalCurrent instantiateScalar(float value, ElectricalCurrentUnit unit)
instantiateScalar
in class AbstractFloatVectorRel<ElectricalCurrentUnit,FloatElectricalCurrentVector,MutableFloatElectricalCurrentVector,FloatElectricalCurrent>
value
- the valueunit
- the unitpublic final MutableFloatElectricalCurrentVector toDense()
public final MutableFloatElectricalCurrentVector toSparse()
public FloatElectricalCurrent[] toArray()
RuntimeException
- wrapping a ValueException on error getting one of the valuesCopyright © 2015–2018 Delft University of Technology. All rights reserved.