@DefaultProvider(value=DefaultNeighborIterationStrategyProvider.class) public interface NeighborIterationStrategy
Abstraction of strategies for iterating over potential neighboring items. This is used by the item-item model builder to iterate over the potential neighbors of an item. It is abstracted so that different strategies can be used depending on the properties of the similarity function and data set.
LongIterator neighborIterator(ItemItemBuildContext context, long item, boolean onlyAfter)
Get an iterator over possible neighbors of an item.
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.