Package org.terrier.realtime.memory
Class MemoryCollectionStatistics
- java.lang.Object
-
- org.terrier.structures.CollectionStatistics
-
- org.terrier.realtime.memory.MemoryCollectionStatistics
-
- All Implemented Interfaces:
java.io.Serializable
,org.apache.hadoop.io.Writable
public class MemoryCollectionStatistics extends CollectionStatistics implements java.io.Serializable
This class provides basic statistics in memory for a collection of documents, such as the average length of documents, or the total number of documents in the collection.- Since:
- 4.0
- Author:
- Richard McCreadie, Stuart Mackie
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.terrier.structures.CollectionStatistics
averageDocumentLength, avgFieldLengths, fieldNames, fieldTokens, hasPositions, numberOfDocuments, numberOfFields, numberOfPointers, numberOfTokens, numberOfUniqueTerms
-
-
Constructor Summary
Constructors Constructor Description MemoryCollectionStatistics(int numDocs, int numTerms, long numTokens, long numPointers, long[] fieldTokens, java.lang.String[] fieldNames)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
relcaluate()
Relcaluate average lengths.void
update(int docs, int tokens, int terms)
Increment doc, token and pointers counters.void
updateFields(long[] ftokens)
Increment field tokens.void
updateUniqueTerms(int numTerms)
Increment unique terms.-
Methods inherited from class org.terrier.structures.CollectionStatistics
addStatistics, getAverageDocumentLength, getAverageFieldLengths, getFieldNames, getFieldTokens, getNumberOfDocuments, getNumberOfFields, getNumberOfPointers, getNumberOfPostings, getNumberOfTokens, getNumberOfUniqueTerms, hasPositions, readFields, readFieldsV5, recalculateAverageLengths, toString, write
-
-
-
-
Method Detail
-
update
public void update(int docs, int tokens, int terms)
Increment doc, token and pointers counters.
-
updateUniqueTerms
public void updateUniqueTerms(int numTerms)
Increment unique terms.
-
updateFields
public void updateFields(long[] ftokens)
Increment field tokens.
-
relcaluate
public void relcaluate()
Relcaluate average lengths.
-
-