|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.terrier.structures.postings.BasicPostingImpl org.terrier.structures.postings.BasicIterablePosting
public class BasicIterablePosting
Basic inverted and direct index format: [gamma(first docid +1) unary (frequency)], [gamma(delta docid) unary(frequency)]
Field Summary | |
---|---|
protected BitIn |
bitFileReader
|
protected DocumentIndex |
doi
|
protected int |
numEntries
|
Fields inherited from class org.terrier.structures.postings.BasicPostingImpl |
---|
id, tf |
Fields inherited from interface org.terrier.structures.postings.IterablePosting |
---|
EOL |
Constructor Summary | |
---|---|
protected |
BasicIterablePosting()
Create a new posting iterator |
|
BasicIterablePosting(BitIn _bitFileReader,
int _numEntries,
DocumentIndex _doi)
Create a new posting iterator |
Method Summary | |
---|---|
WritablePosting |
asWritablePosting()
Copies this posting to one free of an iterator. |
void |
close()
|
boolean |
endOfPostings()
Status method to see if this posting list iterator has been finished |
int |
getDocumentLength()
Returns 0 |
int |
next()
Move this iterator to the next posting. |
int |
next(int target)
Move this iterator to the posting with specified id, or next posting after that. |
Methods inherited from class org.terrier.structures.postings.BasicPostingImpl |
---|
getFrequency, getId, readFields, setId, toString, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.terrier.structures.postings.Posting |
---|
getFrequency, getId, setId |
Field Detail |
---|
protected int numEntries
protected BitIn bitFileReader
protected DocumentIndex doi
Constructor Detail |
---|
protected BasicIterablePosting()
public BasicIterablePosting(BitIn _bitFileReader, int _numEntries, DocumentIndex _doi) throws java.io.IOException
_bitFileReader
- BitIn to read the postings from_numEntries
- number of postings in the list_doi
- document index to use to satisfy getDocumentLength()
java.io.IOException
- thrown in an IO exception occursMethod Detail |
---|
public int next() throws java.io.IOException
next
in interface IterablePosting
java.io.IOException
public int next(int target) throws java.io.IOException
next
in interface IterablePosting
target
- id of the posting to find in this postingn list.
java.io.IOException
public boolean endOfPostings()
endOfPostings
in interface IterablePosting
public int getDocumentLength()
getDocumentLength
in interface Posting
getDocumentLength
in class BasicPostingImpl
public void close() throws java.io.IOException
close
in interface java.io.Closeable
java.io.IOException
public WritablePosting asWritablePosting()
asWritablePosting
in interface Posting
asWritablePosting
in class BasicPostingImpl
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |