Terrier IR Platform
2.2.1

uk.ac.gla.terrier.structures.indexing.singlepass
Class PostingInRun

java.lang.Object
  extended by uk.ac.gla.terrier.structures.indexing.singlepass.PostingInRun
Direct Known Subclasses:
SimplePostingInRun

public abstract class PostingInRun
extends java.lang.Object

Base class for PostingInRun classes


Constructor Summary
PostingInRun()
           
 
Method Summary
 int append(BitOut bos, int last)
          Writes the document data of this posting to a BitOut It encodes the data with the right compression methods.
abstract  int append(BitOut bos, int last, int runShift)
          Writes the document data of this posting to a BitOut It encodes the data with the right compression methods.
 int getDf()
           
 java.lang.String getTerm()
           
 int getTF()
           
 void setDf(int df)
          Setter for the document frequency.
 void setPostingSource(BitIn source)
          Set where the postings should be read from
 void setTerm(java.lang.String term)
          Setter for the term.
 void setTF(int tf)
          Setter for the term frequency.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostingInRun

public PostingInRun()
Method Detail

getDf

public int getDf()
Returns:
the document frequency for the term.

setDf

public void setDf(int df)
Setter for the document frequency.

Parameters:
df - int with the new document frequency.

getTerm

public java.lang.String getTerm()
Returns:
The term String in this posting list.

setTerm

public void setTerm(java.lang.String term)
Setter for the term.

Parameters:
term - String containing the term for this posting list.

getTF

public int getTF()
Returns:
the term frequency.

setTF

public void setTF(int tf)
Setter for the term frequency.

Parameters:
tf - the new term frequency.

setPostingSource

public void setPostingSource(BitIn source)
Set where the postings should be read from


append

public abstract int append(BitOut bos,
                           int last,
                           int runShift)
                    throws java.io.IOException
Writes the document data of this posting to a BitOut It encodes the data with the right compression methods. The stream is written as d1, idf(d1) , d2 - d1, idf(d2) etc.

Parameters:
bos - BitOut to be written.
last - int representing the last document written in timport uk.ac.gla.terrier.structures.indexing.singlepass.RunReader;his posting.
Returns:
The last posting written.
Throws:
java.io.IOException

append

public int append(BitOut bos,
                  int last)
           throws java.io.IOException
Writes the document data of this posting to a BitOut It encodes the data with the right compression methods. The stream is written as d1, idf(d1) , d2 - d1, idf(d2) etc.

Parameters:
bos - BitOut to be written.
last - int representing the last document written in this posting.
Returns:
The last posting written.
Throws:
java.io.IOException

Terrier IR Platform
2.2.1

Terrier Information Retrieval Platform 2.2.1. Copyright 2004-2008 University of Glasgow