org.terrier.structures.postings
Class ArrayOfFieldIterablePosting

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

public class ArrayOfFieldIterablePosting
extends ArrayOfBasicIterablePosting
implements FieldPosting

An instance of IterablePostings that works with passed arrays of ids and frequencies for each field.

Author:
Craig Macdonald

Field Summary
 
Fields inherited from class org.terrier.structures.postings.ArrayOfBasicIterablePosting
doclens, frequencies
 
Fields inherited from class org.terrier.structures.postings.ArrayOfIdsIterablePosting
ids, indice
 
Fields inherited from interface org.terrier.structures.postings.IterablePosting
EOL
 
Constructor Summary
ArrayOfFieldIterablePosting(int[] _ids, int[] _freqs, int[] _lens, int[][] _tff, int[][] _lf)
           
 
Method Summary
 int[] getFieldFrequencies()
          Returns the frequencies of the term in each field of the document
 int[] getFieldLengths()
          Returns the lengths of the each fields in the current document
 void setFieldLengths(int[] newLengths)
           
 
Methods inherited from class org.terrier.structures.postings.ArrayOfBasicIterablePosting
getDocumentLength, getFrequency
 
Methods inherited from class org.terrier.structures.postings.ArrayOfIdsIterablePosting
asWritablePosting, close, endOfPostings, 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
 
Methods inherited from interface org.terrier.structures.postings.Posting
asWritablePosting, getDocumentLength, getFrequency, getId, setId
 

Constructor Detail

ArrayOfFieldIterablePosting

public ArrayOfFieldIterablePosting(int[] _ids,
                                   int[] _freqs,
                                   int[] _lens,
                                   int[][] _tff,
                                   int[][] _lf)
Method Detail

getFieldFrequencies

public int[] getFieldFrequencies()
Description copied from interface: FieldPosting
Returns the frequencies of the term in each field of the document

Specified by:
getFieldFrequencies in interface FieldPosting

getFieldLengths

public int[] getFieldLengths()
Description copied from interface: FieldPosting
Returns the lengths of the each fields in the current document

Specified by:
getFieldLengths in interface FieldPosting

setFieldLengths

public void setFieldLengths(int[] newLengths)
Specified by:
setFieldLengths in interface FieldPosting


Terrier 3.6. Copyright © 2004-2011 University of Glasgow