|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.labs.minion.retrieval.cache.TermCacheElement.TCEIterator
public class TermCacheElement.TCEIterator
An iterator for this element of the term cache.
Constructor Summary | |
---|---|
TermCacheElement.TCEIterator(WeightingComponents wc,
WeightingFunction wf)
|
Method Summary | |
---|---|
int |
compareTo(java.lang.Object o)
Compares this postings iterator to another one. |
boolean |
findID(int id)
Finds the given document in the entry we're iterating through, if it exists. |
int |
get(int[] ids)
Reads a number of IDs into the provided array. |
int |
get(int[] ids,
float[] weights)
Reads a number of IDs and the associated weights into the provided arrays. |
int |
get(int[] ids,
int[] freq)
Reads a number of IDs and frequencies into the provided arrays. |
PostingsIteratorFeatures |
getFeatures()
Gets the features that were used to create this iterator. |
int |
getFreq()
Gets the frequency of the term in the current document. |
int |
getID()
Gets the document sequence number that the iterator is currently pointing at. |
int |
getN()
Gets the number of IDs that this iterator will produce. |
float |
getWeight()
Gets the weight of the term in the current document, as generated by some weighting function. |
boolean |
next()
Moves to the next document in this entry. |
void |
reset()
Resets the iterator to the beginning of the entry. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TermCacheElement.TCEIterator(WeightingComponents wc, WeightingFunction wf)
Method Detail |
---|
public PostingsIteratorFeatures getFeatures()
PostingsIterator
getFeatures
in interface PostingsIterator
null
if no features were used.public int getN()
PostingsIterator
getN
in interface PostingsIterator
public int get(int[] ids)
PostingsIterator
get
in interface PostingsIterator
public int get(int[] ids, int[] freq)
PostingsIterator
get
in interface PostingsIterator
ids
- an array into which IDs will be placed. If possible,
the array will be filled.freq
- an array into which frequencies will be placed. If
possible, the array will be filled.
public int get(int[] ids, float[] weights)
PostingsIterator
get
in interface PostingsIterator
ids
- an array into which IDs will be placed. If possible,
the array will be filled.weights
- an array into which weights will be placed. If
possible, the array will be filled.
public boolean next()
PostingsIterator
java.util.Iterator.next()
method in that it
does not return an object. This would require too much object
creation overhead during retrieval, and saves the whole
hasNext()
/next()
function call overhead.
You should use the accessor functions for the iterator to find out
the actual document, position, etc. that the iterator is at.
next
in interface PostingsIterator
public boolean findID(int id)
PostingsIterator
findID
in interface PostingsIterator
id
- The ID that we want to find.
PostingsIterator.reset()
public void reset()
PostingsIterator
next
method is called.
reset
in interface PostingsIterator
public int getID()
PostingsIterator
getID
in interface PostingsIterator
public float getWeight()
PostingsIterator
getWeight
in interface PostingsIterator
public int getFreq()
PostingsIterator
getFreq
in interface PostingsIterator
public int compareTo(java.lang.Object o)
PostingsIterator
compareTo
in interface PostingsIterator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |