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 AbstractFloatVectorAbs<AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,A extends AbstractFloatVectorAbs<AU,RU,A,R,MA,S>,R extends AbstractFloatVectorRel<RU,R,?,?>,MA extends AbstractMutableFloatVectorAbs<AU,RU,A,R,MA,S>,S extends AbstractFloatScalarAbs<AU,S,RU,?>> extends AbstractFloatVector<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 |
AbstractFloatVectorAbs.Itr
The iterator class is loosely based in AbstractList.Itr.
|
data
Constructor and Description |
---|
AbstractFloatVectorAbs(float[] values,
AU unit,
StorageType storageType)
Construct a new Absolute Immutable FloatVector.
|
AbstractFloatVectorAbs(FloatVectorData data,
AU unit)
Construct a new Relative Immutable FloatVector.
|
AbstractFloatVectorAbs(List<Float> values,
AU unit,
StorageType storageType)
Construct a new Absolute Immutable FloatVector.
|
AbstractFloatVectorAbs(List<S> values,
StorageType storageType)
Construct a new Absolute Immutable FloatVector.
|
AbstractFloatVectorAbs(S[] values,
StorageType storageType)
Construct a new Absolute Immutable FloatVector.
|
AbstractFloatVectorAbs(SortedMap<Integer,Float> values,
AU unit,
int length,
StorageType storageType)
Construct a new Absolute Immutable FloatVector.
|
AbstractFloatVectorAbs(SortedMap<Integer,S> values,
int length,
StorageType storageType)
Construct a new Absolute Immutable FloatVector.
|
Modifier and Type | Method and Description |
---|---|
(package private) static <AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,S extends AbstractFloatScalarAbs<AU,S,RU,?>> |
checkUnit(List<S> dsList)
Check that a provided list can be used to create some descendant of a FloatVector, and return the Unit.
|
(package private) static <AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,S extends AbstractFloatScalarAbs<AU,S,RU,?>> |
checkUnit(S[] dsArray)
Check that a provided array can be used to create some descendant of a FloatVector, and return the Unit.
|
(package private) static <AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,S extends AbstractFloatScalarAbs<AU,S,RU,?>> |
checkUnit(SortedMap<Integer,S> dsMap)
Check that a provided Map can be used to create some descendant of a FloatVector.
|
S |
get(int index)
Retrieve a value from the vector.
|
protected abstract MA |
instantiateMutableType(FloatVectorData dvd,
AU unit)
Construct a new Absolute Mutable FloatVector of the right type.
|
protected abstract S |
instantiateScalar(float value,
AU unit)
Construct a new Absolute Immutable FloatScalar of the right type.
|
protected abstract A |
instantiateTypeAbs(FloatVectorData dvd,
AU unit)
Construct a new Absolute Immutable FloatVector of the right type.
|
protected abstract R |
instantiateTypeRel(FloatVectorData dvd,
RU unit)
Construct a new Relative Immutable FloatVector 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 FloatVector.
|
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
AbstractFloatVectorAbs(float[] values, AU unit, StorageType storageType) throws ValueException
values
- float[]; the values of the entries in the new Absolute Immutable FloatVectorunit
- AU; the unit of the new Absolute Immutable FloatVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullAbstractFloatVectorAbs(List<Float> values, AU unit, StorageType storageType) throws ValueException
values
- List; the values of the entries in the new Absolute Immutable FloatVectorunit
- AU; the unit of the new Absolute Immutable FloatVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullAbstractFloatVectorAbs(S[] values, StorageType storageType) throws ValueException
values
- FloatScalar.Abs<U>[]; the values of the entries in the new Absolute Immutable FloatVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriesAbstractFloatVectorAbs(List<S> values, StorageType storageType) throws ValueException
values
- List; the values of the entries in the new Absolute Immutable FloatVectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriesAbstractFloatVectorAbs(SortedMap<Integer,S> values, int length, StorageType storageType) throws ValueException
values
- FloatScalar.Abs<U>[]; the values of the entries in the new Absolute Sparse Mutable FloatVectorlength
- the size of the vectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriesAbstractFloatVectorAbs(SortedMap<Integer,Float> values, AU unit, int length, StorageType storageType) throws ValueException
values
- Map; the map of indexes to values of the Absolute Sparse Mutable FloatVectorunit
- AU; the unit of the new Absolute Sparse Mutable FloatVectorlength
- the size of the vectorstorageType
- the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullAbstractFloatVectorAbs(FloatVectorData data, AU unit)
data
- an internal data objectunit
- the unitpublic MA mutable()
mutable
in interface FloatVectorInterface<AU extends AbsoluteLinearUnit<AU,RU>>
protected abstract A instantiateTypeAbs(FloatVectorData dvd, AU unit)
dvd
- an internal data objectunit
- the unitprotected abstract R instantiateTypeRel(FloatVectorData dvd, RU unit)
dvd
- an internal data objectunit
- the unitprotected abstract MA instantiateMutableType(FloatVectorData dvd, AU unit)
dvd
- an internal data objectunit
- the unitprotected abstract S instantiateScalar(float value, AU unit)
value
- the valueunit
- the unitpublic S get(int index) throws ValueException
get
in class AbstractFloatVector<AU extends AbsoluteLinearUnit<AU,RU>,A extends AbstractFloatVectorAbs<AU,RU,A,R,MA,S>>
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 AbstractFloatVectorAbs<AU,RU,A,R,MA,S>,R extends AbstractFloatVectorRel<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 AbstractFloatVectorAbs<AU,RU,A,R,MA,S>,R extends AbstractFloatVectorRel<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 AbstractFloatVectorAbs<AU,RU,A,R,MA,S>,R extends AbstractFloatVectorRel<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 AbstractFloatScalarAbs<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 AbstractFloatScalarAbs<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 AbstractFloatScalarAbs<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.