|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object it.unimi.di.mg4j.search.AlignDocumentIterator.AlignIntervalIterator
protected class AlignDocumentIterator.AlignIntervalIterator
An interval iterator returning the intersection of the component interval iterators.
Constructor Summary | |
---|---|
protected |
AlignDocumentIterator.AlignIntervalIterator()
|
Method Summary | |
---|---|
int |
extent()
Returns an approximation of a lower bound for the length of an interval returned by this iterator. |
void |
intervalTerms(IntSet terms)
Provides the set of terms that span the current interval. |
Interval |
nextInterval()
Returns the next interval provided by this interval iterator, or null if no more intervals are available. |
IntervalIterator |
reset()
Resets the internal state of this iterator for a new document. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected AlignDocumentIterator.AlignIntervalIterator()
Method Detail |
---|
public IntervalIterator reset() throws IOException
IntervalIterator
To reduce object creation, interval iterators are usually created in a lazy
fashion by document iterator when they are needed. However, this implies that
every time the document iterator is moved, some internal state of the interval iterator must be reset
(e.g., because on the new document some of the component interval iterators are now
IntervalIterators.TRUE
). The semantics of this method is largely implementation dependent,
with the important exception that the return value must be IntervalIterators.FALSE
if
the first call to IntervalIterator.nextInterval()
will return null
.
reset
in interface IntervalIterator
IntervalIterators.FALSE
if this interval iterator will return null
at the
first call to IntervalIterator.nextInterval()
; this interval iterator, otherwise.
IOException
public void intervalTerms(IntSet terms)
IntervalIterator
For each interval returned by MG4J, there is a set of terms that caused the interval to be returned. The terms appear inside the interval, and certainly at its extremes.
Note that the results of this method must be taken with a grain of salt: there might be different sets of terms causing the current interval, and only one will be returned.
intervalTerms
in interface IntervalIterator
terms
- a set of integers that will be filled with the terms spanning the current interval.public Interval nextInterval() throws IOException
IntervalIterator
null
if no more intervals are available.
nextInterval
in interface IntervalIterator
null
if no more intervals are available.
IOException
public int extent()
IntervalIterator
extent
in interface IntervalIterator
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |