it.unimi.dsi.mg4j.search
Class AndDocumentIterator
java.lang.Object
it.unimi.dsi.fastutil.ints.AbstractIntIterator
it.unimi.dsi.mg4j.search.AbstractDocumentIterator
it.unimi.dsi.mg4j.search.AbstractCompositeDocumentIterator
it.unimi.dsi.mg4j.search.AbstractIntersectionDocumentIterator
it.unimi.dsi.mg4j.search.AndDocumentIterator
- All Implemented Interfaces:
- IntIterator, DocumentIterator, Iterable<Interval>, Iterator<Integer>
public class AndDocumentIterator
- extends AbstractIntersectionDocumentIterator
A document iterator that returns the AND of a number of document iterators.
This class adds to AbstractIntersectionDocumentIterator
an interval iterator generating the AND of the intervals returned for each of the documents involved.
Methods inherited from interface it.unimi.dsi.fastutil.ints.IntIterator |
skip |
AndDocumentIterator
protected AndDocumentIterator(DocumentIterator[] documentIterator)
throws IOException
- Throws:
IOException
getInstance
public static DocumentIterator getInstance(Index index,
DocumentIterator... documentIterator)
throws IOException
- Returns a document iterator that computes the AND of the given array of iterators.
Note that the special case of the empty and of the singleton arrays
are handled efficiently.
- Parameters:
index
- the default index; relevant only if it
has zero length.documentIterator
- the iterators to be joined.
- Returns:
- a document iterator that computes the AND of
it
.
- Throws:
IOException
getInstance
public static DocumentIterator getInstance(DocumentIterator... documentIterator)
throws IOException
- Returns a document iterator that computes the AND of the given nonzero-length array of iterators.
Note that the special case of the singleton array is handled efficiently.
- Parameters:
documentIterator
- the iterators to be joined (at least one).
- Returns:
- a document iterator that computes the AND of
it
.
- Throws:
IOException
getComposedIntervalIterator
protected IntervalIterator getComposedIntervalIterator(Index index)
- Specified by:
getComposedIntervalIterator
in class AbstractIntersectionDocumentIterator