public static class FrequencyVector.Sparse extends FrequencyVector implements SparseData
FrequencyVector.Dense, FrequencyVector.SparseDoubleVector.Abs<U extends Unit<U>>, DoubleVector.Rel<U extends Unit<U>>data| Constructor and Description |
|---|
Sparse(double[] values,
FrequencyUnit unit)
Construct a new Sparse Immutable Double Frequency Vector.
|
Sparse(Frequency[] values)
Construct a new Relative Sparse Immutable Frequency Vector.
|
Sparse(SortedMap<Integer,Double> values,
FrequencyUnit unit,
int length)
Construct a new Sparse Immutable Frequency Vector.
|
Sparse(SortedMap<Integer,DoubleScalar.Rel<FrequencyUnit>> values,
int length)
Construct a new Sparse Immutable Frequency Vector.
|
| Modifier and Type | Method and Description |
|---|---|
protected DoubleVectorDataSparse |
getData() |
MutableFrequencyVector |
mutable()
Create a mutable version of this DoubleVector.
|
FrequencyVector |
toDense()
Create a dense version of this DoubleVector.
|
FrequencyVector |
toSparse()
Create a sparse version of this DoubleVector.
|
divide, get, minus, plus, timesdivide, minus, plus, plus, timescardinality, checkIndex, checkSize, checkSize, equals, getInUnit, getInUnit, getSI, getValuesInUnit, getValuesInUnit, getValuesSI, hashCode, initializeSparse, initializeSparseMA, initializeSparseMR, safeGet, safeSet, size, toString, toString, toString, toString, zSumexpressAsSIUnit, expressAsSpecifiedUnit, getUnit, isAbsolute, isRelativepublic Sparse(SortedMap<Integer,Double> values, FrequencyUnit unit, int length) throws ValueException
values - Map; the map of indexes to values of the Relative Sparse Immutable Frequency Vectorunit - FrequencyUnit; the unit of the new Relative Sparse Immutable Frequency Vectorlength - the size of the vectorValueException - when values is nullpublic Sparse(SortedMap<Integer,DoubleScalar.Rel<FrequencyUnit>> values, int length) throws ValueException
values - DoubleScalar.Rel<U>[]; the values of the entries in the new Relative Sparse Immutable Frequency
Vectorlength - the size of the vectorValueException - when values has zero entriespublic Sparse(double[] values,
FrequencyUnit unit)
throws ValueException
values - double[]; the values of the entries in the new Sparse Immutable Double Frequency Vectorunit - U; the unit of the new Sparse Immutable Frequency VectorValueException - when values is nullpublic Sparse(Frequency[] values) throws ValueException
values - Frequency[]; the values of the Scalar Frequency entries in the new Relative Sparse Immutable Frequency
VectorValueException - when values has zero entriespublic final MutableFrequencyVector mutable()
mutable in interface DoubleVectorInterface<FrequencyUnit>mutable in class FrequencyVectorprotected final DoubleVectorDataSparse getData()
getData in class DoubleVector<FrequencyUnit>public final FrequencyVector toDense()
toDense in interface DoubleVectorInterface<FrequencyUnit>toDense in class FrequencyVectorpublic final FrequencyVector toSparse()
toSparse in interface DoubleVectorInterface<FrequencyUnit>toSparse in class FrequencyVectorCopyright © 2015 Delft University of Technology. All rights reserved.