public class ElectricalResistanceVector extends AbstractDoubleVectorRel<ElectricalResistanceUnit,ElectricalResistanceVector,MutableElectricalResistanceVector,ElectricalResistance>
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.
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
- ElectricalResistanceUnit; the unit of the new Relative Immutable Double ElectricalResistanceVectorstorageType
- StorageType; 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<Double>; the values of the entries in the new Relative Immutable Double
ElectricalResistanceVectorunit
- ElectricalResistanceUnit; the unit of the new Relative Immutable Double ElectricalResistanceVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic ElectricalResistanceVector(ElectricalResistance[] values, StorageType storageType) throws ValueException
values
- ElectricalResistance[]; the values of the entries in the new Relative Immutable Double
ElectricalResistanceVectorstorageType
- StorageType; 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<ElectricalResistance>; the values of the entries in the new Relative Immutable Double
ElectricalResistanceVectorstorageType
- StorageType; 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
- SortedMap<Integer, ElectricalResistance>; the values of the entries in the new Relative Sparse
Mutable Double ElectricalResistanceVectorlength
- int; the size of the vectorstorageType
- StorageType; 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
- SortedMap<Integer, Double>; the map of indexes to values of the Relative Sparse Mutable Double
ElectricalResistanceVectorunit
- ElectricalResistanceUnit; the unit of the new Relative Sparse Mutable Double ElectricalResistanceVectorlength
- int; the size of the vectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullElectricalResistanceVector(DoubleVectorData data, ElectricalResistanceUnit unit)
data
- DoubleVectorData; an internal data objectunit
- ElectricalResistanceUnit; the unitprotected final ElectricalResistanceVector instantiateType(DoubleVectorData dvd, ElectricalResistanceUnit unit)
instantiateType
in class AbstractDoubleVectorRel<ElectricalResistanceUnit,ElectricalResistanceVector,MutableElectricalResistanceVector,ElectricalResistance>
dvd
- DoubleVectorData; an internal data objectunit
- U; the unitprotected final MutableElectricalResistanceVector instantiateMutableType(DoubleVectorData dvd, ElectricalResistanceUnit unit)
instantiateMutableType
in class AbstractDoubleVectorRel<ElectricalResistanceUnit,ElectricalResistanceVector,MutableElectricalResistanceVector,ElectricalResistance>
dvd
- DoubleVectorData; an internal data objectunit
- U; the unitprotected final ElectricalResistance instantiateScalar(double value, ElectricalResistanceUnit unit)
instantiateScalar
in class AbstractDoubleVectorRel<ElectricalResistanceUnit,ElectricalResistanceVector,MutableElectricalResistanceVector,ElectricalResistance>
value
- double; the valueunit
- U; the unitpublic final ElectricalResistanceVector toDense()
public final ElectricalResistanceVector toSparse()
public ElectricalResistance[] toArray()
RuntimeException
- wrapping a ValueException on error getting one of the valuesCopyright © 2015–2019 Delft University of Technology. All rights reserved.