AU
- the absolute unitRU
- the relative unitA
- the absolute vector typeR
- the relative vector typeMA
- the mutable absolute vector typeS
- the absolute scalar typeabstract class AbstractDoubleVectorAbs<AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,A extends AbstractDoubleVectorAbs<AU,RU,A,R,MA,S>,R extends AbstractDoubleVectorRel<RU,R,?,?>,MA extends AbstractMutableDoubleVectorAbs<AU,RU,A,R,MA,S>,S extends AbstractDoubleScalarAbs<AU,S,RU,?>> extends AbstractDoubleVector<AU,A> implements FunctionsAbs<AU,RU,A,R>, Absolute, Serializable, Iterable<S>
Copyright (c) 2013-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUNITS License.
$LastChangedDate: 2015-09-29 14:14:28 +0200 (Tue, 29 Sep 2015) $, @version $Revision: 73 $, by $Author: pknoppers $, initial
version Sep 5, 2015
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractDoubleVectorAbs.Itr
The iterator class is loosely based in AbstractList.Itr.
|
data
Constructor and Description |
---|
AbstractDoubleVectorAbs(double[] values,
AU unit,
StorageType storageType)
Construct a new Absolute Immutable DoubleVector.
|
AbstractDoubleVectorAbs(DoubleVectorData data,
AU unit)
Construct a new Relative Immutable DoubleVector.
|
AbstractDoubleVectorAbs(List<Double> values,
AU unit,
StorageType storageType)
Construct a new Absolute Immutable DoubleVector.
|
AbstractDoubleVectorAbs(List<S> values,
StorageType storageType)
Construct a new Absolute Immutable DoubleVector.
|
AbstractDoubleVectorAbs(S[] values,
StorageType storageType)
Construct a new Absolute Immutable DoubleVector.
|
AbstractDoubleVectorAbs(SortedMap<Integer,Double> values,
AU unit,
int length,
StorageType storageType)
Construct a new Absolute Immutable DoubleVector.
|
AbstractDoubleVectorAbs(SortedMap<Integer,S> values,
int length,
StorageType storageType)
Construct a new Absolute Immutable DoubleVector.
|
Modifier and Type | Method and Description |
---|---|
(package private) static <AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,S extends AbstractDoubleScalarAbs<AU,S,RU,?>> |
checkUnit(List<S> dsList)
Check that a provided list can be used to create some descendant of a DoubleVector, and return the Unit.
|
(package private) static <AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,S extends AbstractDoubleScalarAbs<AU,S,RU,?>> |
checkUnit(S[] dsArray)
Check that a provided array can be used to create some descendant of a DoubleVector, and return the Unit.
|
(package private) static <AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,S extends AbstractDoubleScalarAbs<AU,S,RU,?>> |
checkUnit(SortedMap<Integer,S> dsMap)
Check that a provided Map can be used to create some descendant of a DoubleVector.
|
S |
get(int index)
Retrieve a value from the vector.
|
protected abstract MA |
instantiateMutableType(DoubleVectorData dvd,
AU unit)
Construct a new Absolute Mutable DoubleVector of the right type.
|
protected abstract S |
instantiateScalar(double value,
AU unit)
Construct a new Absolute Immutable DoubleScalar of the right type.
|
protected abstract A |
instantiateTypeAbs(DoubleVectorData dvd,
AU unit)
Construct a new Absolute Immutable DoubleVector of the right type.
|
protected abstract R |
instantiateTypeRel(DoubleVectorData dvd,
RU unit)
Construct a new Relative Immutable DoubleVector of the right type.
|
Iterator<S> |
iterator()
Returns an iterator over the scalars in this vector in proper sequence.
|
R |
minus(A abs)
Subtract an Absolute value from this Absolute value for a vector or matrix.
|
A |
minus(R rel)
Subtract a Relative value from this Absolute value for a vector or matrix.
|
MA |
mutable()
Create a mutable version of this DoubleVector.
|
A |
plus(R rel)
Add a Relative value to this Absolute value for a vector or matrix.
|
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
toDense, toSparse
AbstractDoubleVectorAbs(double[] values, AU unit, StorageType storageType) throws ValueException
values
- double[]; the values of the entries in the new Absolute Immutable DoubleVectorunit
- AU; the unit of the new Absolute Immutable DoubleVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullAbstractDoubleVectorAbs(List<Double> values, AU unit, StorageType storageType) throws ValueException
values
- List; the values of the entries in the new Absolute Immutable DoubleVectorunit
- AU; the unit of the new Absolute Immutable DoubleVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullAbstractDoubleVectorAbs(S[] values, StorageType storageType) throws ValueException
values
- DoubleScalar.Abs<U>[]; the values of the entries in the new Absolute Immutable DoubleVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriesAbstractDoubleVectorAbs(List<S> values, StorageType storageType) throws ValueException
values
- List; the values of the entries in the new Absolute Immutable DoubleVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriesAbstractDoubleVectorAbs(SortedMap<Integer,S> values, int length, StorageType storageType) throws ValueException
values
- DoubleScalar.Abs<U>[]; the values of the entries in the new Absolute Sparse Mutable DoubleVectorlength
- the size of the vectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriesAbstractDoubleVectorAbs(SortedMap<Integer,Double> values, AU unit, int length, StorageType storageType) throws ValueException
values
- Map; the map of indexes to values of the Absolute Sparse Mutable DoubleVectorunit
- AU; the unit of the new Absolute Sparse Mutable DoubleVectorlength
- the size of the vectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullAbstractDoubleVectorAbs(DoubleVectorData data, AU unit)
data
- an internal data objectunit
- the unitpublic MA mutable()
mutable
in interface DoubleVectorInterface<AU extends AbsoluteLinearUnit<AU,RU>>
protected abstract A instantiateTypeAbs(DoubleVectorData dvd, AU unit)
dvd
- an internal data objectunit
- the unitprotected abstract R instantiateTypeRel(DoubleVectorData dvd, RU unit)
dvd
- an internal data objectunit
- the unitprotected abstract MA instantiateMutableType(DoubleVectorData dvd, AU unit)
dvd
- an internal data objectunit
- the unitprotected abstract S instantiateScalar(double value, AU unit)
value
- the valueunit
- the unitpublic final S get(int index) throws ValueException
get
in interface DoubleVectorInterface<AU extends AbsoluteLinearUnit<AU,RU>>
index
- the index to retrieve the value atValueException
- in case index is out of boundspublic final A plus(R rel) throws ValueException
plus
in interface FunctionsAbs<AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,A extends AbstractDoubleVectorAbs<AU,RU,A,R,MA,S>,R extends AbstractDoubleVectorRel<RU,R,?,?>>
rel
- R the right operandValueException
- in case this vector and the operand have a different sizepublic A minus(R rel) throws ValueException
minus
in interface FunctionsAbs<AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,A extends AbstractDoubleVectorAbs<AU,RU,A,R,MA,S>,R extends AbstractDoubleVectorRel<RU,R,?,?>>
rel
- R the right operandValueException
- in case this vector and the operand have a different sizepublic R minus(A abs) throws ValueException
minus
in interface FunctionsAbs<AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,A extends AbstractDoubleVectorAbs<AU,RU,A,R,MA,S>,R extends AbstractDoubleVectorRel<RU,R,?,?>>
abs
- A the right operandValueException
- in case this vector and the operand have a different sizestatic <AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,S extends AbstractDoubleScalarAbs<AU,S,RU,?>> AU checkUnit(S[] dsArray) throws ValueException
AU
- the absolute unitRU
- the corresponding relative unitS
- the scalar typedsArray
- the array to check and get the unit forValueException
- when the array has length equal to 0static <AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,S extends AbstractDoubleScalarAbs<AU,S,RU,?>> AU checkUnit(List<S> dsList) throws ValueException
AU
- the absolute unit of the scalars in the listRU
- the corresponding relative unitS
- the scalar in the listdsList
- the list to check and get the unit forValueException
- when the array has length equal to 0static <AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,S extends AbstractDoubleScalarAbs<AU,S,RU,?>> AU checkUnit(SortedMap<Integer,S> dsMap) throws ValueException
AU
- the absolute unit of the scalars in the mapRU
- the corresponding relative unitS
- the scalar in the listdsMap
- the provided mapValueException
- when the list has size equal to 0Copyright © 2015–2018 Delft University of Technology. All rights reserved.