public class InvertedNeighborhood extends Object implements Neighborhood
Constructor and Description |
---|
InvertedNeighborhood(int n,
Neighborhood neighborhood,
IntPredicate filter)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Stream<Tuple2id> |
getNeighbors(int idx)
Returns the neighborhood of a user/index.
|
public InvertedNeighborhood(int n, Neighborhood neighborhood, IntPredicate filter)
n
- number of users/itemsneighborhood
- original neighborhood to be invertedfilter
- filter to determine the users that require an inverted
neighborhoodpublic Stream<Tuple2id> getNeighbors(int idx)
getNeighbors
in interface Neighborhood
idx
- user/index whose neighborhood is calculatedCopyright © 2016. All rights reserved.