|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.terrier.structures.indexing.singlepass.Posting
public class Posting
Class representing a simple posting list in memory.
It keeps the information for TF, Nt
, and the sequence [doc, tf]
Field Summary | |
---|---|
protected MemorySBOS |
docIds
The compressed in-memory object holding the sequence doc_id, idf |
protected int |
lastInt
Last document inserted in the posting |
protected int |
Nt
The document frequency |
protected int |
TF
The term frequency |
Constructor Summary | |
---|---|
Posting()
|
Method Summary | |
---|---|
int |
getDocF()
|
MemorySBOS |
getDocs()
|
int |
getSize()
Returns the size of the underlying buffer representing this posting set. |
int |
getTF()
|
int |
insert(int doc,
int freq)
Inserts a new document in the posting list. |
void |
setDocF(int docF)
Set the document frequency the number of documents this term occurs in. |
void |
setDocs(MemorySBOS docs)
Sets the document data compressed object. |
void |
setTF(int tf)
Sets the term frequency in the run. |
int |
writeFirstDoc(int docId,
int freq)
Writes the first document in the posting list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int TF
protected int Nt
protected MemorySBOS docIds
protected int lastInt
Constructor Detail |
---|
public Posting()
Method Detail |
---|
public int writeFirstDoc(int docId, int freq) throws java.io.IOException
docId
- the document identifier.freq
- the frequency of the term in the document.
java.io.IOException
- if an I/O error ocurrs.public int insert(int doc, int freq) throws java.io.IOException
doc
- the document identifier.freq
- the frequency of the term in the document.
java.io.IOException
- if and I/O error occurs.public int getTF()
public MemorySBOS getDocs()
public void setTF(int tf)
tf
- the term frequency.public void setDocs(MemorySBOS docs)
docs
- public int getDocF()
public void setDocF(int docF)
docF
- the document frequency.public int getSize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |