it.unimi.dsi.mg4j.search.score
Class AbstractIndexScorer
java.lang.Object
it.unimi.dsi.fastutil.ints.AbstractIntIterator
it.unimi.dsi.mg4j.search.score.AbstractScorer
it.unimi.dsi.mg4j.search.score.AbstractIndexScorer
- All Implemented Interfaces:
- IntIterator, FlyweightPrototype<Scorer>, Scorer, Iterator<Integer>
- Direct Known Subclasses:
- AbstractWeightedScorer
public abstract class AbstractIndexScorer
- extends AbstractScorer
An abstract subclass of AbstractScorer
.
It provides additionally caching of the indices used by the current iterator for
scorers that actually use multiple indices.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
n
protected int n
- The current number of elements in
currIndex
.
currIndex
protected Index[] currIndex
- An array containing the indices in
DocumentIterator.indices()
for AbstractScorer.documentIterator
;
it is set up by wrap(DocumentIterator)
.
AbstractIndexScorer
public AbstractIndexScorer()
wrap
public void wrap(DocumentIterator documentIterator)
throws IOException
- Wraps the given document iterator.
Besides the services provided by AbstractScorer.wrap(DocumentIterator)
,
this method sets up currIndex
so that it refers to the indices
actually used in documentIterator
.
- Specified by:
wrap
in interface Scorer
- Overrides:
wrap
in class AbstractScorer
- Parameters:
documentIterator
- the document iterator that will be used in subsequent calls to
Scorer.score()
and Scorer.score(Index)
.
- Throws:
IOException