|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.labs.minion.classification.FeaturePostings.Featurator
public class FeaturePostings.Featurator
| Field Summary | |
|---|---|
protected int |
curr
The current ID. |
protected int |
off
The current offset. |
| Constructor Summary | |
|---|---|
FeaturePostings.Featurator(PostingsIteratorFeatures features)
|
|
| Method Summary | |
|---|---|
int |
compareTo(java.lang.Object o)
Compares this postings iterator to another one. |
Feature |
decode(Feature f)
Decodes the current feature from the info buffer and returns it. |
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 feature in the postings list. |
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 |
| Field Detail |
|---|
protected int curr
protected int off
| Constructor Detail |
|---|
public FeaturePostings.Featurator(PostingsIteratorFeatures features)
| Method Detail |
|---|
public PostingsIteratorFeatures getFeatures()
PostingsIterator
getFeatures in interface PostingsIteratornull
if no features were used.public int getN()
getN in interface PostingsIteratorpublic boolean next()
next in interface PostingsIteratorpublic boolean findID(int id)
findID in interface PostingsIteratorid - The ID that we want to find.
reset()public void reset()
next method is called.
reset in interface PostingsIteratorpublic int getID()
getID in interface PostingsIteratorpublic float getWeight()
getWeight in interface PostingsIteratorpublic int getFreq()
getFreq in interface PostingsIteratorpublic int get(int[] ids)
PostingsIterator
get in interface PostingsIterator
public int get(int[] ids,
int[] freq)
PostingsIterator
get in interface PostingsIteratorids - 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 PostingsIteratorids - 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 int compareTo(java.lang.Object o)
compareTo in interface PostingsIteratorpublic Feature decode(Feature f)
f - the feature into which we'll decode
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||