A container class for (term,document,frequency) triples. More...
#include <Triple_tdf.h>
Public Member Functions | |
Triple_tdf (int doc, int ter, int freq) | |
Initialise a new triple with values. | |
Triple_tdf (void) | |
Create an empty triple. | |
bool | indexOrder (Triple< int > &triple) |
Return true if the index is less than the give triple index. | |
bool | positionOrder (Triple< int > &triple) |
Return true if the position is less than the give triple position. | |
bool | valueOrder (Triple< int > &triple) |
Return true if the value is less than the give triple value. | |
int | index (void) |
Return the index value. | |
int | position (void) |
Return the position value. | |
int | value (void) |
Return the value value. | |
void | index (int x) |
Assign the index value. | |
void | position (int x) |
Assign the position value. | |
void | value (int x) |
Assign the value value. | |
void | encodeValue (CodeBlock *code, Triple< int > *lastElement) |
Encode the value to the CodeBlock, given the last element. | |
void | encodePosition (CodeBlock *code, Triple< int > *lastElement) |
Encode the position to the CodeBlock, given the last element. | |
void | encodeIndex (CodeBlock *code, Triple< int > *lastElement) |
Encode the index to the CodeBlock, given the last element. | |
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, Triple< int > *lastElement) |
Deccode the value from the CodeBlock, given the last element. | |
void | decodePosition (CodeBlock *code, Triple< int > *lastElement) |
Deccode the position from the CodeBlock, given the last element. | |
void | decodeIndex (CodeBlock *code, Triple< int > *lastElement) |
Deccode the index from the CodeBlock, given the last element. | |
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. |
A container class for (term,document,frequency) triples.
This class is used to store triple values where the term id is the index, the document id is the position and the frequency is the value.