public class SparseNeighborIterationStrategy extends java.lang.Object implements NeighborIterationStrategy
Neighbor iteration strategy that looks at the items co-rated with the specified item. It may return more than those items, however, if it looks like it might be faster to not filter.
| Constructor and Description |
|---|
SparseNeighborIterationStrategy() |
| Modifier and Type | Method and Description |
|---|---|
LongIterator |
neighborIterator(ItemItemBuildContext context,
long item,
boolean onlyAfter)
Get an iterator over possible neighbors of an item.
|
public LongIterator neighborIterator(ItemItemBuildContext context, long item, boolean onlyAfter)
NeighborIterationStrategyGet an iterator over possible neighbors of an item.
neighborIterator in interface NeighborIterationStrategycontext - The build context (to get item & neighbor information).item - The item ID. The item may or may not be included in the returned items.onlyAfter - If true, only consider item IDs after item, because the caller only needs unique unordered pairs.item.