CodeBuffer< T > Class Template Reference

A template for encoding and decoding a vector of Triples. More...

Inheritance diagram for CodeBuffer< T >:
CodeBlock BitBlock< unsigned int > Decode< T > Encode< T > EncodeDouble< T >

List of all members.

Public Member Functions

 CodeBuffer (T *lastTriple=0)
 Initialise the code buffer and identify the previous triple used (for difference coding of the first element).
void reset (void)
 Reset the buffer (including the index value).
void resetRow (void)
 Reset the buffer (keep the index value).
void encodeBuffer (TripleList< T > &buffer)
 Encode the given triple buffer.
void decodeBuffer (TripleList< T > &buffer)
 Decode into the triple buffer.
void encodeElement (T *element)
 Encode a single triple.
void decodeElement (T *element)
 Decode a single triple.
void encodeListSize (void)
 Encode the current list size.
void decodeListSize (void)
 Decode the current list size.
bool bufferFinished (void)
 Check if there are any more elements left to encode in the current buffer.

Protected Attributes

T * _lastElement
 The previous element, used for difference coding.
int elementsAvailable
 number of elements to encode or yet uncoded

Detailed Description

template<typename T>
class CodeBuffer< T >

A template for encoding and decoding a vector of Triples.

This class allows the user to encode and decode a vector of Triples, where the triple type is the template parameter. The vector is encoded by first storing the length of the vector (the number of nonzero values), then storing the triple position and value elements. The positions are stored as differences since they are ascending values.

Author
lapark
Revision
1.5
Date
2009/10/08 06:41:29
Id
CodeBuffer.tcc,v 1.5 2009/10/08 06:41:29 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:10 2009 for textIR by  doxygen 1.6.1