U
- Unitpublic static class DoubleVector.Rel<U extends Unit<U>> extends AbstractDoubleVectorRel<U,DoubleVector.Rel<U>,MutableDoubleVector.Rel<U>,DoubleScalar.Rel<U>>
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.
|
DoubleVector.Rel<U> |
toDense()
return a dense version of this vector.
|
DoubleVector.Rel<U> |
toSparse()
return a sparse version of this vector.
|
checkUnit, checkUnit, checkUnit, divide, get, minus, mutable, 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
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
- 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 Mutable DoubleVectorunit
- U; the unit of the new Relative Mutable 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 Mutable DoubleVectorstorageType
- 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; the values of the entries in the new Relative Mutable DoubleVectorstorageType
- 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
- 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 nullpublic Rel(DoubleVectorData data, U unit)
data
- an internal data objectunit
- 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
- an internal data objectunit
- 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
- an internal data objectunit
- 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
- the valueunit
- the unitpublic final DoubleVector.Rel<U> toDense()
public final DoubleVector.Rel<U> toSparse()
Copyright © 2015–2017 Delft University of Technology. All rights reserved.