public class FloatElectricalPotentialVector extends AbstractFloatVectorRel<ElectricalPotentialUnit,FloatElectricalPotentialVector,MutableFloatElectricalPotentialVector,FloatElectricalPotential>
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 |
---|
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
- U; the unit of the new Relative Immutable Float FloatElectricalPotentialVectorstorageType
- 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; the values of the entries in the new Relative Immutable Float FloatElectricalPotentialVectorunit
- U; the unit of the new Relative Immutable Float FloatElectricalPotentialVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic FloatElectricalPotentialVector(FloatElectricalPotential[] values, StorageType storageType) throws ValueException
values
- FloatScalar.Rel<U>[]; the values of the entries in the new Relative Immutable Float
FloatElectricalPotentialVectorstorageType
- 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; the values of the entries in the new Relative Immutable Float FloatElectricalPotentialVectorstorageType
- 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
- FloatScalar.Rel<U>[]; the values of the entries in the new Relative Sparse Mutable Float
FloatElectricalPotentialVectorlength
- the size of the vectorstorageType
- 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
- Map; the map of indexes to values of the Relative Sparse Mutable Float FloatElectricalPotentialVectorunit
- U; the unit of the new Relative Sparse Mutable Float FloatElectricalPotentialVectorlength
- the size of the vectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullFloatElectricalPotentialVector(FloatVectorData data, ElectricalPotentialUnit unit)
data
- an internal data objectunit
- the unitprotected final FloatElectricalPotentialVector instantiateType(FloatVectorData dvd, ElectricalPotentialUnit unit)
instantiateType
in class AbstractFloatVectorRel<ElectricalPotentialUnit,FloatElectricalPotentialVector,MutableFloatElectricalPotentialVector,FloatElectricalPotential>
dvd
- an internal data objectunit
- the unitprotected final MutableFloatElectricalPotentialVector instantiateMutableType(FloatVectorData dvd, ElectricalPotentialUnit unit)
instantiateMutableType
in class AbstractFloatVectorRel<ElectricalPotentialUnit,FloatElectricalPotentialVector,MutableFloatElectricalPotentialVector,FloatElectricalPotential>
dvd
- an internal data objectunit
- the unitprotected final FloatElectricalPotential instantiateScalar(float value, ElectricalPotentialUnit unit)
instantiateScalar
in class AbstractFloatVectorRel<ElectricalPotentialUnit,FloatElectricalPotentialVector,MutableFloatElectricalPotentialVector,FloatElectricalPotential>
value
- the valueunit
- the unitpublic final FloatElectricalPotentialVector toDense()
public final FloatElectricalPotentialVector toSparse()
public FloatElectricalPotential[] toArray()
RuntimeException
- wrapping a ValueException on error getting one of the valuesCopyright © 2015–2018 Delft University of Technology. All rights reserved.