Triple< T > Class Template Reference

A container class for triples. More...

List of all members.

Public Member Functions

 Triple (int index, int position, T value)
 Intialise the triple with values.
 Triple (void)
 Initialise an empty triple.
void operator++ (void)
 Increment the triple value.
bool operator< (Triple< T > &triple)
 Compare triple by index, then position, then value.
void operator= (Triple< T > &triple)
 Assign another triple to this one.
virtual bool indexOrder (Triple< T > &triple)=0
 Return true if this index comes before 'triple's index.
virtual bool positionOrder (Triple< T > &triple)=0
 Return true if this position comes before 'triple's position.
virtual bool valueOrder (Triple< T > &triple)=0
 Return true if this value comes before 'triple's value.
int term (void)
 Return the term value.
int document (void)
 Return the document value.
frequency (void)
 Return the frequency value.
void print (void)
 Print the triple to the screen.
virtual int index (void)=0
 Return the index value.
virtual int position (void)=0
 Return the position value.
virtual int value (void)=0
 Return the value value.
virtual void index (int x)=0
 Assign the index value.
virtual void position (T x)=0
 Assign the position value.
virtual void value (int x)=0
 Assign the value value.
virtual void encodeValue (CodeBlock *code, Triple *lastElement)=0
 Encode the value to the given CodeBlock, given the lastElement.
virtual void encodePosition (CodeBlock *code, Triple *lastElement)=0
 Encode the position to the given CodeBlock, given the lastElement.
virtual void encodeIndex (CodeBlock *code, Triple *lastElement)=0
 Encode the index to the given CodeBlock, given the lastElement.
virtual void encodeValue (CodeBlock *code)=0
 Encode the value to the given CodeBlock.
virtual void encodePosition (CodeBlock *code)=0
 Encode the position to the given CodeBlock.
virtual void encodeIndex (CodeBlock *code)=0
 Encode the index to the given CodeBlock.
virtual void decodeValue (CodeBlock *code, Triple *lastElement)=0
 Decode the value from the CodeBlock, given the lastElement.
virtual void decodePosition (CodeBlock *code, Triple *lastElement)=0
 Decode the position from the CodeBlock, given the lastElement.
virtual void decodeIndex (CodeBlock *code, Triple *lastElement)=0
 Decode the index from the CodeBlock, given the lastElement.
virtual void decodeValue (CodeBlock *code)=0
 Decode the value from the CodeBlock.
virtual void decodePosition (CodeBlock *code)=0
 Decode the position from the CodeBlock.
virtual void decodeIndex (CodeBlock *code)=0
 Decode the index from the CodeBlock.

Protected Attributes

_frequency
 The triple frequency.
unsigned int _document
 The triple documen number.
unsigned int _term
 The triple term.

Detailed Description

template<typename T>
class Triple< T >

A container class for triples.

This class is used to store triple values (document, term, frequency), and defines a set of operations for use. A triple can be used to store any element of an array by identifying the column, row and value of the element. The template paramete T is the frequency type.

Author
lapark
Revision
1.6
Date
2009/10/08 06:41:30
Id
Triple.tcc,v 1.6 2009/10/08 06:41:30 lapark Exp

The documentation for this class was generated from the following file:
 All Classes Functions Variables Friends

Generated on Tue Nov 10 14:12:17 2009 for textIR by  doxygen 1.6.1