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-2019 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
- StorageType; 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<Float>; the values of the entries in the new Absolute Immutable FloatVectorunit
- AU; the unit of the new Absolute Immutable FloatVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullAbstractFloatVectorAbs(S[] values, StorageType storageType) throws ValueException
values
- S[]; the values of the entries in the new Absolute Immutable FloatVectorstorageType
- StorageType; 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<S>; the values of the entries in the new Absolute Immutable FloatVectorstorageType
- StorageType; 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
- SortedMap<Integer, S>; the values of the entries in the new Absolute Sparse Mutable FloatVectorlength
- int; the size of the vectorstorageType
- StorageType; 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
- SortedMap<Integer, Float>; the map of indexes to values of the Absolute Sparse Mutable FloatVectorunit
- AU; the unit of the new Absolute Sparse Mutable FloatVectorlength
- int; the size of the vectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullAbstractFloatVectorAbs(FloatVectorData data, AU unit)
data
- FloatVectorData; an internal data objectunit
- AU; the unitpublic MA mutable()
mutable
in interface FloatVectorInterface<AU extends AbsoluteLinearUnit<AU,RU>>
protected abstract A instantiateTypeAbs(FloatVectorData dvd, AU unit)
dvd
- FloatVectorData; an internal data objectunit
- AU; the unitprotected abstract R instantiateTypeRel(FloatVectorData dvd, RU unit)
dvd
- FloatVectorData; an internal data objectunit
- RU; the unitprotected abstract MA instantiateMutableType(FloatVectorData dvd, AU unit)
dvd
- FloatVectorData; an internal data objectunit
- AU; the unitprotected abstract S instantiateScalar(float value, AU unit)
value
- float; the valueunit
- AU; 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
- int; 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; 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; 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; 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
- S[]; 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
- List<S>; 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
- SortedMap<Integer,S>; the provided mapValueException
- when the list has size equal to 0Copyright © 2015–2019 Delft University of Technology. All rights reserved.