public class SparseVector extends java.lang.Object
Constructor and Description |
---|
SparseVector() |
Modifier and Type | Method and Description |
---|---|
double |
cosineSimilarity(SparseVector other)
Computes the cosine distance between this and the given vector.
|
void |
set(int key,
double value)
Sets the given value under the given key, value must not be
null |
public SparseVector()
public void set(int key, double value)
null
public double cosineSimilarity(SparseVector other)