public class FloatElectricalPotentialVector extends AbstractFloatVectorRel<ElectricalPotentialUnit,FloatElectricalPotentialVector,MutableFloatElectricalPotentialVector,FloatElectricalPotential>
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 |
---|
FloatElectricalPotentialVector(float[] values,
ElectricalPotentialUnit unit,
StorageType storageType)
Construct a new Relative Immutable Float FloatElectricalPotentialVector.
|
FloatElectricalPotentialVector(FloatElectricalPotential[] values,
StorageType storageType)
Construct a new Relative Immutable Float FloatElectricalPotentialVector.
|
FloatElectricalPotentialVector(FloatVectorData data,
ElectricalPotentialUnit unit) |
FloatElectricalPotentialVector(List<Float> values,
ElectricalPotentialUnit unit,
StorageType storageType)
Construct a new Relative Immutable Float FloatElectricalPotentialVector.
|
FloatElectricalPotentialVector(List<FloatElectricalPotential> values,
StorageType storageType)
Construct a new Relative Immutable Float FloatElectricalPotentialVector.
|
FloatElectricalPotentialVector(SortedMap<Integer,Float> values,
ElectricalPotentialUnit unit,
int length,
StorageType storageType)
Construct a new Relative Immutable Float FloatElectricalPotentialVector.
|
FloatElectricalPotentialVector(SortedMap<Integer,FloatElectricalPotential> values,
int length,
StorageType storageType)
Construct a new Relative Immutable Float FloatElectricalPotentialVector.
|
Modifier and Type | Method and Description |
---|---|
protected MutableFloatElectricalPotentialVector |
instantiateMutableType(FloatVectorData dvd,
ElectricalPotentialUnit unit)
Construct a new Relative Mutable FloatVector of the right type.
|
protected FloatElectricalPotential |
instantiateScalar(float value,
ElectricalPotentialUnit unit)
Construct a new Relative Immutable FloatScalar of the right type.
|
protected FloatElectricalPotentialVector |
instantiateType(FloatVectorData dvd,
ElectricalPotentialUnit unit)
Construct a new Relative Immutable FloatVector of the right type.
|
FloatElectricalPotential[] |
toArray()
Return an array of FloatElectricalPotential Scalars from this vector.
|
FloatElectricalPotentialVector |
toDense()
return a dense version of this vector.
|
FloatElectricalPotentialVector |
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 FloatElectricalPotentialVector(float[] values, ElectricalPotentialUnit unit, StorageType storageType) throws ValueException
values
- float[]; the values of the entries in the new Relative Immutable Float FloatElectricalPotentialVectorunit
- ElectricalPotentialUnit; the unit of the new Relative Immutable Float FloatElectricalPotentialVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic FloatElectricalPotentialVector(List<Float> values, ElectricalPotentialUnit unit, StorageType storageType) throws ValueException
values
- List<Float>; the values of the entries in the new Relative Immutable Float
FloatElectricalPotentialVectorunit
- ElectricalPotentialUnit; the unit of the new Relative Immutable Float FloatElectricalPotentialVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic FloatElectricalPotentialVector(FloatElectricalPotential[] values, StorageType storageType) throws ValueException
values
- FloatElectricalPotential[]; the values of the entries in the new Relative Immutable Float
FloatElectricalPotentialVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic FloatElectricalPotentialVector(List<FloatElectricalPotential> values, StorageType storageType) throws ValueException
values
- List<FloatElectricalPotential>; the values of the entries in the new Relative Immutable Float
FloatElectricalPotentialVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic FloatElectricalPotentialVector(SortedMap<Integer,FloatElectricalPotential> values, int length, StorageType storageType) throws ValueException
values
- SortedMap<Integer, FloatElectricalPotential>; the values of the entries in the new Relative Sparse
Mutable Float FloatElectricalPotentialVectorlength
- int; the size of the vectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic FloatElectricalPotentialVector(SortedMap<Integer,Float> values, ElectricalPotentialUnit unit, int length, StorageType storageType) throws ValueException
values
- SortedMap<Integer, Float>; the map of indexes to values of the Relative Sparse Mutable Float
FloatElectricalPotentialVectorunit
- ElectricalPotentialUnit; the unit of the new Relative Sparse Mutable Float FloatElectricalPotentialVectorlength
- int; the size of the vectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullFloatElectricalPotentialVector(FloatVectorData data, ElectricalPotentialUnit unit)
data
- FloatVectorData; an internal data objectunit
- ElectricalPotentialUnit; the unitprotected final FloatElectricalPotentialVector instantiateType(FloatVectorData dvd, ElectricalPotentialUnit unit)
instantiateType
in class AbstractFloatVectorRel<ElectricalPotentialUnit,FloatElectricalPotentialVector,MutableFloatElectricalPotentialVector,FloatElectricalPotential>
dvd
- FloatVectorData; an internal data objectunit
- U; the unitprotected final MutableFloatElectricalPotentialVector instantiateMutableType(FloatVectorData dvd, ElectricalPotentialUnit unit)
instantiateMutableType
in class AbstractFloatVectorRel<ElectricalPotentialUnit,FloatElectricalPotentialVector,MutableFloatElectricalPotentialVector,FloatElectricalPotential>
dvd
- FloatVectorData; an internal data objectunit
- U; the unitprotected final FloatElectricalPotential instantiateScalar(float value, ElectricalPotentialUnit unit)
instantiateScalar
in class AbstractFloatVectorRel<ElectricalPotentialUnit,FloatElectricalPotentialVector,MutableFloatElectricalPotentialVector,FloatElectricalPotential>
value
- float; the valueunit
- U; the unitpublic final FloatElectricalPotentialVector toDense()
public final FloatElectricalPotentialVector toSparse()
public FloatElectricalPotential[] toArray()
RuntimeException
- wrapping a ValueException on error getting one of the valuesCopyright © 2015–2019 Delft University of Technology. All rights reserved.