Public Member Functions | Protected Member Functions | Protected Attributes

TDecisionBox Class Reference

List of N last results of the recognition process. More...

#include <t_decision_box.h>

Collaboration diagram for TDecisionBox:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TDecisionBox (int size, int maxVal)
 Creates new decision box.
 ~TDecisionBox (void)
 Frees allocated resources.
bool insertItem (int number, double distance)
 Inserts solution properties as one item in the box.
void decide (int *configuration, double *distance)
 Finds the most supported solution.

Protected Member Functions

void countDistances (void)
 Refreshes the confWeights table.

Protected Attributes

int size
 Capacity of the box.
int count
 Actual number of items in the box.
int maxVal
 Maximal value of result.
double * confWeights
 Table of weights of each configuration.
Configurationhead
 First and last item in the box.
Configurationtail

Detailed Description

List of N last results of the recognition process.

Provides functions to insert new configuration (which also deletes the oldest one) and to retrieve the most supported configuration.


Constructor & Destructor Documentation

TDecisionBox::TDecisionBox ( int  size,
int  maxVal 
)

Creates new decision box.

Parameters:
size Number of results to store in memory and decide from.
maxVal Highest number of configuration.
TDecisionBox::~TDecisionBox ( void   ) 

Frees allocated resources.


Member Function Documentation

void TDecisionBox::countDistances ( void   )  [protected]

Refreshes the confWeights table.

Here is the caller graph for this function:

void TDecisionBox::decide ( int *  configuration,
double *  distance 
)

Finds the most supported solution.

Parameters:
configuration Number of selected configuration is stored here.
distance Distance between best and second best result is stored here.

Here is the call graph for this function:

Here is the caller graph for this function:

bool TDecisionBox::insertItem ( int  number,
double  distance 
)

Inserts solution properties as one item in the box.

Parameters:
number Number of (best matching) configuration.
distance Distance between this and second configuration.
Returns:
False if (number) is invalid value, else true.

Here is the caller graph for this function:


Member Data Documentation

double* TDecisionBox::confWeights [protected]

Table of weights of each configuration.

int TDecisionBox::count [protected]

Actual number of items in the box.

First and last item in the box.

int TDecisionBox::maxVal [protected]

Maximal value of result.

int TDecisionBox::size [protected]

Capacity of the box.


The documentation for this class was generated from the following files: