public class ElectricalResistanceVector extends AbstractDoubleVectorRel<ElectricalResistanceUnit,ElectricalResistanceVector,MutableElectricalResistanceVector,ElectricalResistance>
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.
AbstractDoubleVectorRel.Itr
data
Constructor and Description |
---|
ElectricalResistanceVector(double[] values,
ElectricalResistanceUnit unit,
StorageType storageType)
Construct a new Relative Immutable Double ElectricalResistanceVector.
|
ElectricalResistanceVector(DoubleVectorData data,
ElectricalResistanceUnit unit) |
ElectricalResistanceVector(ElectricalResistance[] values,
StorageType storageType)
Construct a new Relative Immutable Double ElectricalResistanceVector.
|
ElectricalResistanceVector(List<Double> values,
ElectricalResistanceUnit unit,
StorageType storageType)
Construct a new Relative Immutable Double ElectricalResistanceVector.
|
ElectricalResistanceVector(List<ElectricalResistance> values,
StorageType storageType)
Construct a new Relative Immutable Double ElectricalResistanceVector.
|
ElectricalResistanceVector(SortedMap<Integer,Double> values,
ElectricalResistanceUnit unit,
int length,
StorageType storageType)
Construct a new Relative Immutable Double ElectricalResistanceVector.
|
ElectricalResistanceVector(SortedMap<Integer,ElectricalResistance> values,
int length,
StorageType storageType)
Construct a new Relative Immutable Double ElectricalResistanceVector.
|
Modifier and Type | Method and Description |
---|---|
protected MutableElectricalResistanceVector |
instantiateMutableType(DoubleVectorData dvd,
ElectricalResistanceUnit unit)
Construct a new Relative Mutable DoubleVector of the right type.
|
protected ElectricalResistance |
instantiateScalar(double value,
ElectricalResistanceUnit unit)
Construct a new Relative Immutable DoubleScalar of the right type.
|
protected ElectricalResistanceVector |
instantiateType(DoubleVectorData dvd,
ElectricalResistanceUnit unit)
Construct a new Relative Immutable DoubleVector of the right type.
|
ElectricalResistance[] |
toArray()
Return an array of ElectricalResistance Scalars from this vector.
|
ElectricalResistanceVector |
toDense()
return a dense version of this vector.
|
ElectricalResistanceVector |
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 ElectricalResistanceVector(double[] values, ElectricalResistanceUnit unit, StorageType storageType) throws ValueException
values
- double[]; the values of the entries in the new Relative Immutable Double ElectricalResistanceVectorunit
- U; the unit of the new Relative Immutable Double ElectricalResistanceVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic ElectricalResistanceVector(List<Double> values, ElectricalResistanceUnit unit, StorageType storageType) throws ValueException
values
- List; the values of the entries in the new Relative Immutable Double ElectricalResistanceVectorunit
- U; the unit of the new Relative Immutable Double ElectricalResistanceVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic ElectricalResistanceVector(ElectricalResistance[] values, StorageType storageType) throws ValueException
values
- DoubleScalar.Rel<U>[]; the values of the entries in the new Relative Immutable Double
ElectricalResistanceVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic ElectricalResistanceVector(List<ElectricalResistance> values, StorageType storageType) throws ValueException
values
- List; the values of the entries in the new Relative Immutable Double ElectricalResistanceVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic ElectricalResistanceVector(SortedMap<Integer,ElectricalResistance> values, int length, StorageType storageType) throws ValueException
values
- DoubleScalar.Rel<U>[]; the values of the entries in the new Relative Sparse Mutable Double
ElectricalResistanceVectorlength
- the size of the vectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic ElectricalResistanceVector(SortedMap<Integer,Double> values, ElectricalResistanceUnit unit, int length, StorageType storageType) throws ValueException
values
- Map; the map of indexes to values of the Relative Sparse Mutable Double ElectricalResistanceVectorunit
- U; the unit of the new Relative Sparse Mutable Double ElectricalResistanceVectorlength
- the size of the vectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullElectricalResistanceVector(DoubleVectorData data, ElectricalResistanceUnit unit)
data
- an internal data objectunit
- the unitprotected final ElectricalResistanceVector instantiateType(DoubleVectorData dvd, ElectricalResistanceUnit unit)
instantiateType
in class AbstractDoubleVectorRel<ElectricalResistanceUnit,ElectricalResistanceVector,MutableElectricalResistanceVector,ElectricalResistance>
dvd
- an internal data objectunit
- the unitprotected final MutableElectricalResistanceVector instantiateMutableType(DoubleVectorData dvd, ElectricalResistanceUnit unit)
instantiateMutableType
in class AbstractDoubleVectorRel<ElectricalResistanceUnit,ElectricalResistanceVector,MutableElectricalResistanceVector,ElectricalResistance>
dvd
- an internal data objectunit
- the unitprotected final ElectricalResistance instantiateScalar(double value, ElectricalResistanceUnit unit)
instantiateScalar
in class AbstractDoubleVectorRel<ElectricalResistanceUnit,ElectricalResistanceVector,MutableElectricalResistanceVector,ElectricalResistance>
value
- the valueunit
- the unitpublic final ElectricalResistanceVector toDense()
public final ElectricalResistanceVector toSparse()
public ElectricalResistance[] toArray()
RuntimeException
- wrapping a ValueException on error getting one of the valuesCopyright © 2015–2018 Delft University of Technology. All rights reserved.