|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cc.mallet.types.SparseVector cc.mallet.types.HashedSparseVector
public class HashedSparseVector
Field Summary |
---|
Fields inherited from class cc.mallet.types.SparseVector |
---|
hasInfinite, indices, values |
Constructor Summary | |
---|---|
HashedSparseVector()
Create an empty vector |
|
HashedSparseVector(int[] featureIndices)
Create binary vector |
|
HashedSparseVector(int[] featureIndices,
double[] values)
Create non-binary vector, possibly dense if "featureIndices" or possibly sparse, if not |
|
HashedSparseVector(int[] indices,
double[] values,
int capacity,
int size,
boolean copy,
boolean checkIndicesSorted,
boolean removeDuplicates)
|
Method Summary | |
---|---|
ConstantMatrix |
cloneMatrix()
CLONING |
ConstantMatrix |
cloneMatrixZeroed()
|
void |
columnPlusEquals(int index,
double value)
|
double |
dotProduct(DenseVector v)
|
double |
dotProduct(SparseVector v)
|
void |
indexVector()
|
void |
plusEqualsSparse(SparseVector v)
For each index i that is present in this vector, set this[i] += v[i]. |
void |
plusEqualsSparse(SparseVector v,
double factor)
For each index i that is present in this vector, set this[i] += factor * v[i]. |
void |
setAll(double v)
Sets every present index in the vector to v. |
void |
setValue(int index,
double value)
Sets the value at the given index. |
void |
setValueAtLocation(int location,
double value)
Sets the value at the given location. |
Methods inherited from class cc.mallet.types.SparseVector |
---|
absNorm, addTo, addTo, arrayCopyFrom, arrayCopyFrom, arrayCopyInto, dotProduct, dotProduct, extendedDotProduct, extendedDotProduct, getDimensions, getIndices, getNumDimensions, getValues, incrementValue, indexAtLocation, infinityNorm, isBinary, isInfinite, isNaN, isNaNOrInfinite, location, makeBinary, makeNonBinary, map, numLocations, oneNorm, print, removeDuplicates, singleIndex, singleSize, singleToIndices, singleValue, sortIndices, timesEquals, timesEqualsSparse, timesEqualsSparse, timesEqualsSparseZero, toString, toString, twoNorm, value, value, valueAtLocation, vectorAdd |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HashedSparseVector(int[] indices, double[] values, int capacity, int size, boolean copy, boolean checkIndicesSorted, boolean removeDuplicates)
public HashedSparseVector()
public HashedSparseVector(int[] featureIndices, double[] values)
public HashedSparseVector(int[] featureIndices)
Method Detail |
---|
public ConstantMatrix cloneMatrix()
SparseVector
cloneMatrix
in interface ConstantMatrix
cloneMatrix
in class SparseVector
public ConstantMatrix cloneMatrixZeroed()
cloneMatrixZeroed
in class SparseVector
public void indexVector()
public final void setValue(int index, double value)
SparseVector
setValue
in class SparseVector
public final void setValueAtLocation(int location, double value)
SparseVector
setValueAtLocation
in class SparseVector
public void columnPlusEquals(int index, double value)
public final double dotProduct(DenseVector v)
dotProduct
in class SparseVector
public final double dotProduct(SparseVector v)
dotProduct
in class SparseVector
public final void plusEqualsSparse(SparseVector v, double factor)
SparseVector
plusEqualsSparse
in class SparseVector
public final void plusEqualsSparse(SparseVector v)
SparseVector
plusEqualsSparse
in class SparseVector
public final void setAll(double v)
SparseVector
setAll
in class SparseVector
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |