ExtensiveComparator Class Reference

A simple integer comparator. This class compares two integer between them, according to the score they are given. Scores are stored in an array and can be modified every time. More...

#include <extensivecomparator.hh>

List of all members.

Public Member Functions

QECODE_EXPORT ExtensiveComparator (int the_size, int *the_scores)
QECODE_EXPORT bool operator() (int a, int b)
 The method to compare two integers. This compares the scores of a and b. Returns true if the first argument has a smaller score than b.

Private Attributes

int size
int * scores


Detailed Description

A simple integer comparator. This class compares two integer between them, according to the score they are given. Scores are stored in an array and can be modified every time.

Definition at line 29 of file extensivecomparator.hh.


Constructor & Destructor Documentation

ExtensiveComparator::ExtensiveComparator ( int  the_size,
int *  the_scores 
)

Constructor for an extensive Comparator.

Parameters:
the_size This comparator will compare integers from 0 to this parameter.
the_scores The array of scores.

Definition at line 26 of file extensivecomparator.cc.

References scores, and size.


Member Function Documentation

bool ExtensiveComparator::operator() ( int  a,
int  b 
)

The method to compare two integers. This compares the scores of a and b. Returns true if the first argument has a smaller score than b.

Definition at line 31 of file extensivecomparator.cc.

References scores, and size.


Member Data Documentation

int ExtensiveComparator::size [private]

Definition at line 30 of file extensivecomparator.hh.

Referenced by ExtensiveComparator(), and operator()().

int* ExtensiveComparator::scores [private]

Definition at line 31 of file extensivecomparator.hh.

Referenced by ExtensiveComparator(), and operator()().


The documentation for this class was generated from the following files:
Generated on Thu Feb 7 14:34:26 2008 for qecode by  doxygen 1.5.2