|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectit.unimi.dsi.fastutil.ints.AbstractIntIterator
it.unimi.dsi.mg4j.search.LowPassDocumentIterator
A document iterator that filters another document iterator, returning just intervals (and containing documents) whose length does not exceed a given threshold.
| Field Summary | |
protected int |
threshold
The iterator threshold. |
| Constructor Summary | |
LowPassDocumentIterator(DocumentIterator it,
int threshold)
Creates a new low-pass document iterator over a given iterator. |
|
| Method Summary | |
int |
document()
Returns the last document returned by IntIterator.nextInt(). |
boolean |
hasNext()
|
Set |
indices()
Returns the set of indices over which this iterator is built. |
IntervalIterator |
intervalIterator()
Returns the interval iterator of this document iterator for single-index queries. |
IntervalIterator |
intervalIterator(Index index)
Returns the interval iterator of this document iterator for the given index. |
Map |
intervalIterators()
Returns an unmodifiable map from indices to interval iterators. |
int |
nextDocument()
A synonym for IntIterator.nextInt(). |
int |
nextInt()
|
int |
skipTo(int n)
Skips all documents smaller than n. |
String |
toString()
|
| Methods inherited from class it.unimi.dsi.fastutil.ints.AbstractIntIterator |
next, remove, skip |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface it.unimi.dsi.fastutil.ints.IntIterator |
skip |
| Methods inherited from interface java.util.Iterator |
next, remove |
| Field Detail |
protected final int threshold
| Constructor Detail |
public LowPassDocumentIterator(DocumentIterator it,
int threshold)
it - the iterator to be filtered.threshold - the filter threshold.| Method Detail |
public Set indices()
DocumentIterator
indices in interface DocumentIteratorpublic int skipTo(int n)
DocumentIteratorn.
Let k be the last document returned by IntIterator.nextInt(). If
k is larger than or equal to n, then
this method does nothing and returns k. Otherwise, a
call to this method is equivalent to
while( hasNext() && ( k = nextInt() ) < n ); return hasNext() ? k : -1;
Beware that the first document larger than or equal to n (which is returned
by this method) will not be returned by the next call to IntIterator.nextInt().
skipTo in interface DocumentIteratorn - a document index.
n; otherwise,
an document larger than or equal to n as described above.public int nextInt()
nextInt in interface IntIteratorpublic int document()
DocumentIteratorIntIterator.nextInt().
document in interface DocumentIteratorIntIterator.nextInt(), or -1 if no document has been returned yet.public int nextDocument()
DocumentIteratorIntIterator.nextInt().
nextDocument in interface DocumentIteratorpublic boolean hasNext()
hasNext in interface Iteratorpublic Map intervalIterators()
DocumentIteratorAfter a call to IntIterator.nextInt(), this map
can be used to retrieve the intervals in the current document. An invocation of Map.get(java.lang.Object)
on this map with argument index yields the same result as
intervalIterator(index).
intervalIterators in interface DocumentIteratorDocumentIterator.intervalIterator(Index)public IntervalIterator intervalIterator()
DocumentIteratorThis is a commodity method that can be used only for queries built over a single index.
intervalIterator in interface DocumentIteratorDocumentIterator.intervalIterator(Index)public IntervalIterator intervalIterator(Index index)
DocumentIteratorAfter a call to IntIterator.nextInt(), this iterator
can be used to retrieve the intervals in the current document (the
one returned by IntIterator.nextInt()) for
the index index.
Note that it is guaranteed that at least one index will return an interval. However, for disjunctive queries it cannot be guaranteed that all indices will return an interval.
intervalIterator in interface DocumentIteratorindex - an index (must be one over which the query was built).
index.public String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||