public class SparseNeighborIterationStrategy extends Object implements NeighborIterationStrategy
| 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)
NeighborIterationStrategyneighborIterator 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.