Accumulator< T > Class Template Reference

Accumulate and order partial scores. More...

Inheritance diagram for Accumulator< T >:
AdditiveAccumulator< T > CombinatorialAccumulator< T > LinkAdditiveAccumulator< T > ModAccumulator< T > MultiplyAccumulator< T > RBKAccumulator< T >

List of all members.

Public Member Functions

 Accumulator (int asize=ACCUMULATOR_SIZE)
 Construct the Accumulator with a given buffer size.
void add_element (T *element)
 Add an element to the accumulator.
int filled (void)
 Check if the accumulator is full.
void finaliseAccumulator (void)
 Perform the finishing operations on the accumulator.
Heap< OrderByPosition< T > > * topElements (int number=RESULTS_SIZE)
 Use a heap to order the accumulator elements by their position.
Heap< OrderByValue< T > > * topElementsByValue (int number=RESULTS_SIZE)
 Use a heap to order the accumulator elements by their value.
void operator+= (Accumulator< T > *otherAccumulator)
 Add the results from another accumulator to this one.
void operator*= (float multiplier)
 Multiply all of the accumulator elements by a constant.

Protected Attributes

HASHREC< unsigned int, float > * hashElement
 Using to look up elements.
float cohesion
 Experimental variable.
HashTable< unsigned int, float > * accumulatorHash
 The accumulator hash table for fast look ups.

Detailed Description

template<typename T>
class Accumulator< T >

Accumulate and order partial scores.

This class is used to keep track of partially computed scores, to allow the user to stop when wanted and return the partial (or complete) score is the desired order.

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