Class MemoryFieldsDirectIterablePosting
- java.lang.Object
-
- org.terrier.structures.postings.IterablePostingImpl
-
- org.terrier.realtime.memory.MemoryDirectIterablePosting
-
- org.terrier.realtime.memory.fields.MemoryFieldsDirectIterablePosting
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,FieldPosting
,IterablePosting
,Posting
public class MemoryFieldsDirectIterablePosting extends MemoryDirectIterablePosting implements FieldPosting
-
-
Field Summary
-
Fields inherited from class org.terrier.realtime.memory.MemoryDirectIterablePosting
index, pl_termids
-
Fields inherited from interface org.terrier.structures.postings.IterablePosting
END_OF_LIST, EOL
-
-
Constructor Summary
Constructors Constructor Description MemoryFieldsDirectIterablePosting(gnu.trove.TIntArrayList pl_termids, gnu.trove.TIntArrayList pl_freq, java.util.List<int[]> _pl_fields)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WritablePosting
asWritablePosting()
Copy this posting to one free of an iterator.int[]
getFieldFrequencies()
Returns the frequencies of the term in each field of the documentint[]
getFieldLengths()
Returns the lengths of the each fields in the current documentvoid
setFieldLengths(int[] newLengths)
-
Methods inherited from class org.terrier.realtime.memory.MemoryDirectIterablePosting
close, endOfPostings, getDocumentLength, getFrequency, getId, next
-
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
getDocumentLength, getFrequency, getId, setId
-
-
-
-
Method Detail
-
asWritablePosting
public WritablePosting asWritablePosting()
Description copied from class:MemoryDirectIterablePosting
Copy this posting to one free of an iterator. Kind of like a clone.- Specified by:
asWritablePosting
in interfacePosting
- Overrides:
asWritablePosting
in classMemoryDirectIterablePosting
- Returns:
- an identical posting, but which can be manipulated free of this iterator
-
getFieldFrequencies
public int[] getFieldFrequencies()
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()
Returns the lengths of the each fields 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
-
-