| Package | Description |
|---|---|
| org.grouplens.lenskit.scored |
Associate IDs with scores.
|
| org.grouplens.lenskit.vectors |
Vectors (both sparse and dense) and their operations.
|
| Modifier and Type | Method and Description |
|---|---|
static FastCollection<ScoredId> |
ScoredIds.collectionFromVector(SparseVector vector)
View a vector as a
FastCollection of ScoredId objects. |
| Modifier and Type | Class and Description |
|---|---|
class |
ImmutableSparseVector
Immutable sparse vectors.
|
class |
MutableSparseVector
Mutable version of sparse vector.
|
| Modifier and Type | Method and Description |
|---|---|
abstract SparseVector |
SparseVector.getChannelVector(Symbol channelSymbol)
Get the vector associated with a particular unboxed channel.
|
SparseVector |
VectorEntry.getVector()
Get the sparse vector associated with this entry.
|
SparseVector |
MutableSparseVector.removeChannelVector(Symbol channelSymbol)
Remove the channel stored under a particular symbol.
|
| Modifier and Type | Method and Description |
|---|---|
void |
MutableSparseVector.add(SparseVector other)
Add another rating vector to this one.
|
int |
SparseVector.countCommonKeys(SparseVector o)
Count the common keys between two vectors.
|
double |
SparseVector.dot(SparseVector o)
Compute the dot product between two vectors.
|
static Iterable<org.apache.commons.lang3.tuple.Pair<VectorEntry,VectorEntry>> |
Vectors.fastIntersect(SparseVector v1,
SparseVector v2)
Iterate over the intersection of two vectors without the overhead of object creation.
|
static Iterable<org.apache.commons.lang3.tuple.ImmutablePair<VectorEntry,VectorEntry>> |
Vectors.intersect(SparseVector v1,
SparseVector v2)
Iterate over the intersection of two vectors - they keys they have in common.
|
void |
MutableSparseVector.multiply(SparseVector other)
Multiply each element in the vector by the corresponding element in another vector.
|
void |
MutableSparseVector.set(SparseVector other)
Set the values in this SparseVector to equal the values in
for each key that is present in both vectors.
|
void |
MutableSparseVector.subtract(SparseVector other)
Subtract another rating vector from this one.
|
Copyright © 2013 GroupLens Research. All Rights Reserved.