U - Unit the unit for which this Vector will be createdpublic static class DoubleVector.Rel<U extends Unit<U>> extends DoubleVector<U> implements Relative, FunctionsRel<U,DoubleVector.Abs<U>,DoubleVector.Rel<U>>
DoubleVector.Abs<U extends Unit<U>>, DoubleVector.Rel<U extends Unit<U>>data| Constructor and Description |
|---|
Rel(double[] values,
U unit,
StorageType storageType)
Construct a new Relative Immutable DoubleVector.
|
Rel(DoubleScalar.Rel<U>[] values,
StorageType storageType)
Construct a new Relative Immutable DoubleVector.
|
Rel(DoubleVectorData data,
U unit)
Construct a new Relative Immutable DoubleVector.
|
Rel(List<Double> values,
U unit,
StorageType storageType)
Construct a new Relative Immutable DoubleVector.
|
Rel(List<S> values,
StorageType storageType)
Construct a new Relative Immutable DoubleVector.
|
Rel(SortedMap<Integer,Double> values,
U unit,
int length,
StorageType storageType)
Construct a new Relative Immutable DoubleVector.
|
Rel(SortedMap<Integer,S> values,
int length,
StorageType storageType)
Construct a new Relative Immutable DoubleVector.
|
| Modifier and Type | Method and Description |
|---|---|
DoubleVector.Rel<U> |
divide(DoubleVector.Rel<U> rel)
Divide this Relative value by a Relative value for a vector or matrix.
|
DoubleScalar.Rel<U> |
get(int index)
Retrieve the value stored at a specified index as a DoubleScalar.
|
DoubleVector.Rel<U> |
minus(DoubleVector.Rel<U> rel)
Subtract a Relative value from this Relative value for a vector or matrix.
|
MutableDoubleVector.Rel<U> |
mutable()
Create a mutable version of this DoubleVector.
|
DoubleVector.Abs<U> |
plus(DoubleVector.Abs<U> abs)
Add an Absolute value to this Relative value for a vector or matrix.
|
DoubleVector.Rel<U> |
plus(DoubleVector.Rel<U> rel)
Add a Relative value to this Relative value for a vector or matrix.
|
DoubleVector.Rel<U> |
times(DoubleVector.Rel<U> rel)
Multiply a Relative value by this Relative value for a vector or matrix.
|
DoubleVector.Rel<U> |
toDense()
Create a dense version of this DoubleVector.
|
DoubleVector.Rel<U> |
toSparse()
Create a sparse version of this DoubleVector.
|
cardinality, checkIndex, checkSize, checkSize, checkUnit, checkUnit, checkUnit, equals, getData, getInUnit, getInUnit, getSI, getStorageType, getValuesInUnit, getValuesInUnit, getValuesSI, hashCode, instantiateAbs, instantiateRel, size, toString, toString, toString, toString, zSumexpressAsSIUnit, expressAsSpecifiedUnit, getUnit, isAbsolute, isRelativepublic Rel(double[] values,
U unit,
StorageType storageType)
throws ValueException
values - double[]; the values of the entries in the new Relative Immutable DoubleVectorunit - U; the unit of the new Relative Immutable DoubleVectorstorageType - the data type to use (e.g., DENSE or SPARSE)ValueException - when values is nullpublic Rel(List<Double> values, U unit, StorageType storageType) throws ValueException
values - List; the values of the entries in the new Relative Immutable DoubleVectorunit - U; the unit of the new Relative Immutable DoubleVectorstorageType - the data type to use (e.g., DENSE or SPARSE)ValueException - when values is nullpublic Rel(DoubleScalar.Rel<U>[] values, StorageType storageType) throws ValueException
values - DoubleScalar.Rel<U>[]; the values of the entries in the new Relative Immutable DoubleVectorstorageType - the data type to use (e.g., DENSE or SPARSE)ValueException - when values has zero entriespublic Rel(List<S> values, StorageType storageType) throws ValueException
S - the Scalar type usedvalues - List; the values of the entries in the new Relative Immutable DoubleVectorstorageType - the data type to use (e.g., DENSE or SPARSE)ValueException - when values has zero entriespublic Rel(SortedMap<Integer,S> values, int length, StorageType storageType) throws ValueException
S - the Scalar type usedvalues - DoubleScalar.Rel<U>[]; the values of the entries in the new Relative Sparse Mutable DoubleVectorlength - the size of the vectorstorageType - the data type to use (e.g., DENSE or SPARSE)ValueException - when values has zero entriespublic Rel(SortedMap<Integer,Double> values, U unit, int length, StorageType storageType) throws ValueException
values - Map; the map of indexes to values of the Relative Sparse Mutable DoubleVectorunit - U; the unit of the new Relative Sparse Mutable DoubleVectorlength - the size of the vectorstorageType - the data type to use (e.g., DENSE or SPARSE)ValueException - when values is nullRel(DoubleVectorData data, U unit)
data - an internal data objectunit - the unitpublic MutableDoubleVector.Rel<U> mutable()
mutable in interface DoubleVectorInterface<U extends Unit<U>>public DoubleVector.Rel<U> toDense()
toDense in interface DoubleVectorInterface<U extends Unit<U>>public DoubleVector.Rel<U> toSparse()
toSparse in interface DoubleVectorInterface<U extends Unit<U>>public DoubleScalar.Rel<U> get(int index) throws ValueException
get in interface DoubleVectorInterface<U extends Unit<U>>index - int; index of the value to retrieveValueException - when index out of range (index < 0 or index >= size())public DoubleVector.Rel<U> plus(DoubleVector.Rel<U> rel) throws ValueException
plus in interface FunctionsRel<U extends Unit<U>,DoubleVector.Abs<U extends Unit<U>>,DoubleVector.Rel<U extends Unit<U>>>rel - R the right operandValueException - in case this vector or matrix and the operand have a different sizepublic DoubleVector.Abs<U> plus(DoubleVector.Abs<U> abs) throws ValueException
plus in interface FunctionsRel<U extends Unit<U>,DoubleVector.Abs<U extends Unit<U>>,DoubleVector.Rel<U extends Unit<U>>>abs - A the right operandValueException - in case this vector or matrix and the operand have a different sizepublic final DoubleVector.Rel<U> minus(DoubleVector.Rel<U> rel) throws ValueException
minus in interface FunctionsRel<U extends Unit<U>,DoubleVector.Abs<U extends Unit<U>>,DoubleVector.Rel<U extends Unit<U>>>rel - R the right operandValueException - in case this vector or matrix and the operand have a different sizepublic final DoubleVector.Rel<U> times(DoubleVector.Rel<U> rel) throws ValueException
times in interface FunctionsRel<U extends Unit<U>,DoubleVector.Abs<U extends Unit<U>>,DoubleVector.Rel<U extends Unit<U>>>rel - R the right operandValueException - in case this vector or matrix and the operand have a different sizepublic final DoubleVector.Rel<U> divide(DoubleVector.Rel<U> rel) throws ValueException
divide in interface FunctionsRel<U extends Unit<U>,DoubleVector.Abs<U extends Unit<U>>,DoubleVector.Rel<U extends Unit<U>>>rel - R the right operandValueException - in case this vector or matrix and the operand have a different sizeCopyright © 2015–2016 Delft University of Technology. All rights reserved.