Package org.terrier.structures.postings
Class ArrayOfFieldIterablePosting
- java.lang.Object
-
- org.terrier.structures.postings.IterablePostingImpl
-
- org.terrier.structures.postings.ArrayOfIdsIterablePosting
-
- org.terrier.structures.postings.ArrayOfBasicIterablePosting
-
- org.terrier.structures.postings.ArrayOfFieldIterablePosting
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,java.lang.Cloneable
,FieldPosting
,IterablePosting
,Posting
- Direct Known Subclasses:
ArrayOfBlockFieldIterablePosting
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
id, ids, indice
-
Fields inherited from interface org.terrier.structures.postings.IterablePosting
END_OF_LIST, EOL
-
-
Constructor Summary
Constructors Constructor Description ArrayOfFieldIterablePosting(int[] _ids, int[] _freqs, int[] _lens, int[][] _tff, int[][] _lf)
ArrayOfFieldIterablePosting(int[] _ids, int[] _freqs, int[] _lens, int[][] _tff, int[][] _lf, boolean invert)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int[]
getFieldFrequencies()
Returns the frequencies of the term in each field of the document.int[]
getFieldLengths()
Returns the lengths of the each field 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, clone, close, endOfPostings, getId, next, reset
-
Methods inherited from class org.terrier.structures.postings.IterablePostingImpl
next
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.terrier.structures.postings.Posting
asWritablePosting, getDocumentLength, getFrequency, getId, setId
-
-
-
-
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 interfaceFieldPosting
- Returns:
- the frequencies of the term in each field of the document.
-
getFieldLengths
public int[] getFieldLengths()
Description copied from interface:FieldPosting
Returns the lengths of the each field in the current document.- Specified by:
getFieldLengths
in interfaceFieldPosting
- Returns:
- the lengths of the each field in the current document.
-
setFieldLengths
public void setFieldLengths(int[] newLengths)
- Specified by:
setFieldLengths
in interfaceFieldPosting
-
-