public class BasicNeighborIterationStrategy extends Object implements NeighborIterationStrategy
Neighbor iteration strategy that considers all items to be candidate neighbors.
Constructor and Description |
---|
BasicNeighborIterationStrategy() |
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)
NeighborIterationStrategy
Get an iterator over possible neighbors of an item.
neighborIterator
in interface NeighborIterationStrategy
context
- 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
.