A double class (document, frequency). More...
Public Member Functions | |
TDouble (int doc, T freq) | |
Initialise the double. | |
void | operator++ (void) |
Increment the frequency. | |
bool | operator< (TDouble< T > &triple) |
Compare to a triple for ineqality. | |
void | operator= (Triple< T > &triple) |
Assign the triple to this double. | |
int | position (void) |
Return the document number. | |
int | index (void) |
Return the term number. | |
T | value (void) |
Return the frequency value. | |
void | position (int x) |
Assign the document number. | |
void | index (int x) |
Assign the term number. | |
void | value (int x) |
Assign the frequency value. | |
int | term (void) |
Return the term number. | |
int | document (void) |
Return the document number. | |
T | frequency (void) |
Return the frequency value. | |
void | encodeValue (CodeBlock *code, TDouble< T > *lastElement) |
Encode the value to the given CodeBlock, given the lastElement. | |
void | encodePosition (CodeBlock *code, TDouble< T > *lastElement) |
Encode the position to the given CodeBlock, given the lastElement. | |
void | encodeIndex (CodeBlock *code, TDouble< T > *lastElement) |
Encode the index to the given CodeBlock, given the lastElement. | |
void | encodeValue (CodeBlock *code) |
Encode the value to the given CodeBlock. | |
void | encodePosition (CodeBlock *code) |
Encode the position to the given CodeBlock. | |
void | encodeIndex (CodeBlock *code) |
Encode the index to the given CodeBlock. | |
void | decodeValue (CodeBlock *code, TDouble< T > *lastElement) |
Decode the value from the CodeBlock, given the lastElement. | |
void | decodePosition (CodeBlock *code, TDouble< T > *lastElement) |
Decode the position from the CodeBlock, given the lastElement. | |
void | decodeIndex (CodeBlock *code, TDouble< T > *lastElement) |
Decode the index from the CodeBlock, given the lastElement. | |
void | decodeValue (CodeBlock *code) |
Decode the value from the CodeBlock. | |
void | decodePosition (CodeBlock *code) |
Decode the position from the CodeBlock. | |
void | decodeIndex (CodeBlock *code) |
Decode the index from the CodeBlock. | |
Friends | |
class | TDoubleSort< T > |
class | CodeBuffer< TDouble< T > > |
A double class (document, frequency).
This class provides a structure for storing and manupulating doubles (document, frequency values). This is useful for storing lists where the list index is not needed. The template parameter is the type of frequency value used.