|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.terrier.structures.postings.IterablePostingImpl
org.terrier.structures.postings.ANDIterablePosting
public class ANDIterablePosting
An instance of IterablePostings that works with passed arrays of ids and frequencies. The document must contain all of the terms in the query to be matched (AND)
Field Summary | |
---|---|
protected int |
currentId
|
protected int |
frequency
|
protected IterablePosting[] |
ips
|
protected int |
termCount
|
Fields inherited from interface org.terrier.structures.postings.IterablePosting |
---|
EOL |
Constructor Summary | |
---|---|
ANDIterablePosting(IterablePosting[] _ips,
Pointer[] _p)
|
Method Summary | |
---|---|
WritablePosting |
asWritablePosting()
Copies this posting to one free of an iterator. |
protected boolean |
calculateFrequency()
returns true if the document matches |
void |
close()
|
boolean |
endOfPostings()
Status method to see if this posting list iterator has been finished |
int |
getDocumentLength()
Return the length of the document for this posting. |
int |
getFrequency()
Return the frequency of the term in the current document |
int |
getId()
Return the id of the current posting. |
int |
next()
Move this iterator to the next posting. |
void |
setId(int id)
It may be of benefit to update the frequency of the id in some applications. |
Methods inherited from class org.terrier.structures.postings.IterablePostingImpl |
---|
next |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int currentId
protected IterablePosting[] ips
protected final int termCount
protected int frequency
Constructor Detail |
---|
public ANDIterablePosting(IterablePosting[] _ips, Pointer[] _p) throws IOException
IOException
Method Detail |
---|
public int getId()
Posting
public int getFrequency()
Posting
public int getDocumentLength()
Posting
public void setId(int id)
Posting
public int next() throws IOException
IterablePosting
IOException
protected boolean calculateFrequency()
public boolean endOfPostings()
IterablePosting
public void close() throws IOException
IOException
public WritablePosting asWritablePosting()
Posting
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |