public class FloatElectricalCurrentVector extends AbstractFloatVectorRel<ElectricalCurrentUnit,FloatElectricalCurrentVector,MutableFloatElectricalCurrentVector,FloatElectricalCurrent>
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.
AbstractFloatVectorRel.Itr
data
Constructor and Description |
---|
FloatElectricalCurrentVector(float[] values,
ElectricalCurrentUnit unit,
StorageType storageType)
Construct a new Relative Immutable Float FloatElectricalCurrentVector.
|
FloatElectricalCurrentVector(FloatElectricalCurrent[] values,
StorageType storageType)
Construct a new Relative Immutable Float FloatElectricalCurrentVector.
|
FloatElectricalCurrentVector(FloatVectorData data,
ElectricalCurrentUnit unit) |
FloatElectricalCurrentVector(List<Float> values,
ElectricalCurrentUnit unit,
StorageType storageType)
Construct a new Relative Immutable Float FloatElectricalCurrentVector.
|
FloatElectricalCurrentVector(List<FloatElectricalCurrent> values,
StorageType storageType)
Construct a new Relative Immutable Float FloatElectricalCurrentVector.
|
FloatElectricalCurrentVector(SortedMap<Integer,Float> values,
ElectricalCurrentUnit unit,
int length,
StorageType storageType)
Construct a new Relative Immutable Float FloatElectricalCurrentVector.
|
FloatElectricalCurrentVector(SortedMap<Integer,FloatElectricalCurrent> values,
int length,
StorageType storageType)
Construct a new Relative Immutable Float FloatElectricalCurrentVector.
|
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.
|
FloatElectricalCurrentVector |
toDense()
return a dense version of this vector.
|
FloatElectricalCurrentVector |
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 FloatElectricalCurrentVector(float[] values, ElectricalCurrentUnit unit, StorageType storageType) throws ValueException
values
- float[]; the values of the entries in the new Relative Immutable Float FloatElectricalCurrentVectorunit
- ElectricalCurrentUnit; the unit of the new Relative Immutable Float FloatElectricalCurrentVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic FloatElectricalCurrentVector(List<Float> values, ElectricalCurrentUnit unit, StorageType storageType) throws ValueException
values
- List<Float>; the values of the entries in the new Relative Immutable Float
FloatElectricalCurrentVectorunit
- ElectricalCurrentUnit; the unit of the new Relative Immutable Float FloatElectricalCurrentVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic FloatElectricalCurrentVector(FloatElectricalCurrent[] values, StorageType storageType) throws ValueException
values
- FloatElectricalCurrent[]; the values of the entries in the new Relative Immutable Float
FloatElectricalCurrentVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic FloatElectricalCurrentVector(List<FloatElectricalCurrent> values, StorageType storageType) throws ValueException
values
- List<FloatElectricalCurrent>; the values of the entries in the new Relative Immutable Float
FloatElectricalCurrentVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic FloatElectricalCurrentVector(SortedMap<Integer,FloatElectricalCurrent> values, int length, StorageType storageType) throws ValueException
values
- SortedMap<Integer, FloatElectricalCurrent>; the values of the entries in the new Relative Sparse
Mutable Float FloatElectricalCurrentVectorlength
- int; the size of the vectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic FloatElectricalCurrentVector(SortedMap<Integer,Float> values, ElectricalCurrentUnit unit, int length, StorageType storageType) throws ValueException
values
- SortedMap<Integer, Float>; the map of indexes to values of the Relative Sparse Mutable Float
FloatElectricalCurrentVectorunit
- ElectricalCurrentUnit; the unit of the new Relative Sparse Mutable Float FloatElectricalCurrentVectorlength
- int; the size of the vectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullFloatElectricalCurrentVector(FloatVectorData data, ElectricalCurrentUnit unit)
data
- FloatVectorData; an internal data objectunit
- ElectricalCurrentUnit; the unitprotected final FloatElectricalCurrentVector instantiateType(FloatVectorData dvd, ElectricalCurrentUnit unit)
instantiateType
in class AbstractFloatVectorRel<ElectricalCurrentUnit,FloatElectricalCurrentVector,MutableFloatElectricalCurrentVector,FloatElectricalCurrent>
dvd
- FloatVectorData; an internal data objectunit
- U; the unitprotected final MutableFloatElectricalCurrentVector instantiateMutableType(FloatVectorData dvd, ElectricalCurrentUnit unit)
instantiateMutableType
in class AbstractFloatVectorRel<ElectricalCurrentUnit,FloatElectricalCurrentVector,MutableFloatElectricalCurrentVector,FloatElectricalCurrent>
dvd
- FloatVectorData; an internal data objectunit
- U; the unitprotected final FloatElectricalCurrent instantiateScalar(float value, ElectricalCurrentUnit unit)
instantiateScalar
in class AbstractFloatVectorRel<ElectricalCurrentUnit,FloatElectricalCurrentVector,MutableFloatElectricalCurrentVector,FloatElectricalCurrent>
value
- float; the valueunit
- U; the unitpublic final FloatElectricalCurrentVector toDense()
public final FloatElectricalCurrentVector toSparse()
public FloatElectricalCurrent[] toArray()
RuntimeException
- wrapping a ValueException on error getting one of the valuesCopyright © 2015–2019 Delft University of Technology. All rights reserved.