U
- Unitpublic static class MutableDoubleVector.Rel<U extends Unit<U>> extends AbstractMutableDoubleVectorRel<U,DoubleVector.Rel<U>,MutableDoubleVector.Rel<U>,DoubleScalar.Rel<U>>
AbstractDoubleVectorRel.Itr
data
Constructor and Description |
---|
Rel(double[] values,
U unit,
StorageType storageType)
Construct a new Relative Mutable DoubleVector.
|
Rel(DoubleScalar.Rel<U>[] values,
StorageType storageType)
Construct a new Relative Mutable DoubleVector.
|
Rel(DoubleVectorData data,
U unit)
Construct a new Relative Mutable DoubleVector.
|
Rel(List<Double> values,
U unit,
StorageType storageType)
Construct a new Relative Mutable DoubleVector.
|
Rel(List<DoubleScalar.Rel<U>> values,
StorageType storageType)
Construct a new Relative Mutable DoubleVector.
|
Rel(SortedMap<Integer,Double> values,
U unit,
int length,
StorageType storageType)
Construct a new Relative Mutable DoubleVector.
|
Rel(SortedMap<Integer,DoubleScalar.Rel<U>> values,
int length,
StorageType storageType)
Construct a new Relative Mutable DoubleVector.
|
Modifier and Type | Method and Description |
---|---|
protected MutableDoubleVector.Rel<U> |
instantiateMutableType(DoubleVectorData dvd,
U unit)
Construct a new Relative Mutable DoubleVector of the right type.
|
protected DoubleScalar.Rel<U> |
instantiateScalar(double value,
U unit)
Construct a new Relative Immutable DoubleScalar of the right type.
|
protected DoubleVector.Rel<U> |
instantiateType(DoubleVectorData dvd,
U unit)
Construct a new Relative Immutable DoubleVector of the right type.
|
MutableDoubleVector.Rel<U> |
toDense()
return a dense version of this vector.
|
MutableDoubleVector.Rel<U> |
toSparse()
return a sparse version of this vector.
|
abs, assign, ceil, checkCopyOnWrite, copy, decrementBy, decrementBy, decrementBy, divideBy, divideBy, divideBy, floor, immutable, incrementBy, incrementBy, incrementBy, multiplyBy, multiplyBy, multiplyBy, mutable, neg, normalize, rint, round, set, setCopyOnWrite, setInUnit, setSI
checkUnit, checkUnit, checkUnit, divide, get, iterator, minus, 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
DIV, MULT, POW
cardinality, get, getInUnit, getInUnit, getSI, getValuesInUnit, getValuesInUnit, getValuesSI, size, toString, toString, toString, toString, zSum
forEach, spliterator
public Rel(double[] values, U unit, StorageType storageType) throws ValueException
values
- double[]; the values of the entries in the new Relative Mutable DoubleVectorunit
- U; the unit of the new Relative Mutable DoubleVectorstorageType
- StorageType; 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<Double>; the values of the entries in the new Relative Mutable DoubleVectorunit
- U; the unit of the new Relative Mutable DoubleVectorstorageType
- StorageType; 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 Mutable DoubleVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic Rel(List<DoubleScalar.Rel<U>> values, StorageType storageType) throws ValueException
values
- List<DoubleScalar.Rel<U>>; the values of the entries in the new Relative Mutable
DoubleVectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values has zero entriespublic Rel(SortedMap<Integer,DoubleScalar.Rel<U>> values, int length, StorageType storageType) throws ValueException
values
- SortedMap<Integer, DoubleScalar.Rel<U>>; the values of the entries in the new Relative
Sparse Mutable DoubleVectorlength
- int; the size of the vectorstorageType
- StorageType; 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
- SortedMap<Integer, Double>; the map of indexes to values of the Relative Sparse Mutable
DoubleVectorunit
- U; the unit of the new Relative Sparse Mutable DoubleVectorlength
- int; the size of the vectorstorageType
- StorageType; the data type to use (e.g., DENSE or SPARSE)ValueException
- when values is nullpublic Rel(DoubleVectorData data, U unit)
data
- DoubleVectorData; an internal data objectunit
- U; the unitprotected final DoubleVector.Rel<U> instantiateType(DoubleVectorData dvd, U unit)
instantiateType
in class AbstractDoubleVectorRel<U extends Unit<U>,DoubleVector.Rel<U extends Unit<U>>,MutableDoubleVector.Rel<U extends Unit<U>>,DoubleScalar.Rel<U extends Unit<U>>>
dvd
- DoubleVectorData; an internal data objectunit
- U; the unitprotected final MutableDoubleVector.Rel<U> instantiateMutableType(DoubleVectorData dvd, U unit)
instantiateMutableType
in class AbstractDoubleVectorRel<U extends Unit<U>,DoubleVector.Rel<U extends Unit<U>>,MutableDoubleVector.Rel<U extends Unit<U>>,DoubleScalar.Rel<U extends Unit<U>>>
dvd
- DoubleVectorData; an internal data objectunit
- U; the unitprotected final DoubleScalar.Rel<U> instantiateScalar(double value, U unit)
instantiateScalar
in class AbstractDoubleVectorRel<U extends Unit<U>,DoubleVector.Rel<U extends Unit<U>>,MutableDoubleVector.Rel<U extends Unit<U>>,DoubleScalar.Rel<U extends Unit<U>>>
value
- double; the valueunit
- U; the unitpublic final MutableDoubleVector.Rel<U> toDense()
public final MutableDoubleVector.Rel<U> toSparse()
Copyright © 2015–2019 Delft University of Technology. All rights reserved.