public class DefaultNeighborIterationStrategyProvider extends Object implements javax.inject.Provider<NeighborIterationStrategy>
Provider to auto-select an appropriate neighbor iteration strategy. It uses the similarity function to decide which to use, using SparseNeighborIterationStrategy
if the function is sparse and BasicNeighborIterationStrategy
otherwise.
ItemSimilarity.isSparse()
Constructor and Description |
---|
DefaultNeighborIterationStrategyProvider(ItemSimilarity sim)
Construct a new provider.
|
@Inject public DefaultNeighborIterationStrategyProvider(ItemSimilarity sim)
Construct a new provider.
sim
- The item similarity function to use.public NeighborIterationStrategy get()
get
in interface javax.inject.Provider<NeighborIterationStrategy>