org.terrier.structures.postings
Class ArrayOfBasicIterablePosting

java.lang.Object
  extended by org.terrier.structures.postings.IterablePostingImpl
      extended by org.terrier.structures.postings.ArrayOfIdsIterablePosting
          extended by org.terrier.structures.postings.ArrayOfBasicIterablePosting
All Implemented Interfaces:
java.io.Closeable, IterablePosting, Posting

public class ArrayOfBasicIterablePosting
extends ArrayOfIdsIterablePosting

An instance of IterablePostings that works with passed arrays of ids and frequencies

Author:
Craig Macdonald

Field Summary
protected  int[] frequencies
          frequencies of all of the stored postings
 
Fields inherited from class org.terrier.structures.postings.ArrayOfIdsIterablePosting
ids, indice
 
Fields inherited from interface org.terrier.structures.postings.IterablePosting
EOL
 
Constructor Summary
ArrayOfBasicIterablePosting(int[] _ids, int[] _freqs)
          Make a new posting list with these ids and frequencies
 
Method Summary
 int getFrequency()
          Return the frequency of the term in the current document
 
Methods inherited from class org.terrier.structures.postings.ArrayOfIdsIterablePosting
asWritablePosting, close, endOfPostings, getDocumentLength, getId, next, setId
 
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

frequencies

protected int[] frequencies
frequencies of all of the stored postings

Constructor Detail

ArrayOfBasicIterablePosting

public ArrayOfBasicIterablePosting(int[] _ids,
                                   int[] _freqs)
Make a new posting list with these ids and frequencies

Method Detail

getFrequency

public int getFrequency()
Return the frequency of the term in the current document

Specified by:
getFrequency in interface Posting
Overrides:
getFrequency in class ArrayOfIdsIterablePosting
Returns:
frequency of posting, in tokens


Terrier 3.5. Copyright © 2004-2011 University of Glasgow