public final class Vectors extends Object
| Modifier and Type | Method and Description |
|---|---|
static Iterable<org.apache.commons.lang3.tuple.Pair<VectorEntry,VectorEntry>> |
fastIntersect(SparseVector v1,
SparseVector v2)
Iterate over the intersection of two vectors without the overhead of object creation.
|
static MutableSparseVector |
fromScoredIds(List<ScoredId> scores) |
static Iterable<org.apache.commons.lang3.tuple.ImmutablePair<VectorEntry,VectorEntry>> |
intersect(SparseVector v1,
SparseVector v2)
Iterate over the intersection of two vectors - they keys they have in common.
|
public static MutableSparseVector fromScoredIds(List<ScoredId> scores)
public static Iterable<org.apache.commons.lang3.tuple.ImmutablePair<VectorEntry,VectorEntry>> intersect(SparseVector v1, SparseVector v2)
v1 - The first vector.v2 - The second vector.public static Iterable<org.apache.commons.lang3.tuple.Pair<VectorEntry,VectorEntry>> fastIntersect(SparseVector v1, SparseVector v2)
v1 - The first vector.v2 - The second vector.intersect(SparseVector, SparseVector)Copyright © 2013 GroupLens Research. All Rights Reserved.