Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

HeuristicAverage Class Reference

Average-based heuristic. More...

#include <HeuristicAverage.h>

Inheritance diagram for HeuristicAverage:

Heuristic List of all members.

Public Methods

 HeuristicAverage (SimulationStatus *status)
char * GetName ()
float Analyze (unsigned int participant)
float NormalizeRating (float rating)

Protected Methods

long AverageHitTime (unsigned int participant, unsigned int sampleSize)

Protected Attributes

SimulationStatusstatus

Detailed Description

Average-based heuristic.


Constructor & Destructor Documentation

HeuristicAverage::HeuristicAverage SimulationStatus   status
 

Constructor

Parameters:
status  Pointer to the simulation status structure


Member Function Documentation

float HeuristicAverage::Analyze unsigned int    participant [virtual]
 

Analyze the performance of the given participant.

Parameters:
participant  ID of the participant
Returns:
virtual float The participant's new rating (0.0 to 1.0)

Implements Heuristic.

long HeuristicAverage::AverageHitTime unsigned int    participant,
unsigned int    sampleSize
[protected]
 

Calculate the average time to between hits.

Parameters:
participant  ID of the participant
sampleSize  The sample size used in the calculation
Returns:
long The average time (in milliseconds) between hits.

char* HeuristicAverage::GetName   [inline, virtual]
 

Get the name of the current heuristic.

Returns:
char String containing the name of the current heuristic.

Implements Heuristic.

float Heuristic::NormalizeRating float    rating [inherited]
 

Modify the given rating to ensure it stays within normal boundaries (0.0 to 1.0).

Parameters:
rating  The rating to normalize.
Returns:
float The normalized version of the rating.


Member Data Documentation

SimulationStatus* Heuristic::status [protected, inherited]
 


The documentation for this class was generated from the following files:
Generated on Mon Mar 4 08:42:26 2002 for Aria by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002