CalibrationIndividual Class Reference

#include <BB2004Calibrator.h>

Inheritance diagram for CalibrationIndividual:

BBIndividual List of all members.

Public Member Functions

 CalibrationIndividual ()
virtual void init (const BBIndividual &initial)
virtual void interpolate (const BBIndividual &other)
virtual void extrapolate (const BBIndividual &other)
virtual void mutate ()
virtual double getFitness () const
void setFitness (double fitness)
void select () const
void dump () const

Private Types

 numOfGenes = 7
enum  { numOfGenes = 7 }

Private Attributes

double genes [numOfGenes]
double fitness

Static Private Attributes

static double geneScale [numOfGenes]

Detailed Description

The class represents an individual for a set of walking parameters.

Definition at line 30 of file BB2004Calibrator.h.


Member Enumeration Documentation

anonymous enum [private]

Enumerator:
numOfGenes  The number of genes of the individual.

Definition at line 33 of file BB2004Calibrator.h.


Constructor & Destructor Documentation

CalibrationIndividual::CalibrationIndividual (  )  [inline]

Constructor.

Definition at line 45 of file BB2004Calibrator.h.

References fitness.


Member Function Documentation

void CalibrationIndividual::dump (  )  const

The function prints the genes.

Definition at line 75 of file BB2004Calibrator.cpp.

References OutMessage::finishMessage(), genes, getDebugOut(), idText, numOfGenes, and text.

Referenced by BB2004Calibrator::evolve().

void CalibrationIndividual::extrapolate ( const BBIndividual other  )  [virtual]

The function extrapolates between the current individual and another one.

Parameters:
other The other individual the current one is extrapolated with.

Implements BBIndividual.

Definition at line 47 of file BB2004Calibrator.cpp.

References fitness, genes, numOfGenes, and random().

virtual double CalibrationIndividual::getFitness (  )  const [inline, virtual]

The function returns the fitness of the individual.

Returns:
The fitness as a number >= 0. A higher result means a higher fitness.

Implements BBIndividual.

Definition at line 75 of file BB2004Calibrator.h.

References fitness.

Referenced by BB2004Calibrator::evolve().

void CalibrationIndividual::init ( const BBIndividual initial  )  [virtual]

The function initializes the current individual with another one.

Parameters:
initial The other individual the current one is initialized with.

Implements BBIndividual.

Definition at line 20 of file BB2004Calibrator.cpp.

References fitness, genes, getRobotConfiguration(), and mutate().

void CalibrationIndividual::interpolate ( const BBIndividual other  )  [virtual]

The function interpolates between the current individual and another one. The result is stored in the current individual.

Parameters:
other The other individual the current one is interpolated with.

Implements BBIndividual.

Definition at line 28 of file BB2004Calibrator.cpp.

References fitness, genes, numOfGenes, and random().

void CalibrationIndividual::mutate (  )  [virtual]

The function mutates the current individual.

Implements BBIndividual.

Definition at line 41 of file BB2004Calibrator.cpp.

References genes, numOfGenes, and random().

Referenced by init().

void CalibrationIndividual::select (  )  const

The function copies the genes into the calibration parameters.

Definition at line 63 of file BB2004Calibrator.cpp.

References genes, getRobotConfiguration(), RobotCalibration::panFactor, RobotConfiguration::setRobotCalibration(), RobotCalibration::tilt2Factor, and RobotCalibration::tiltFactor.

void CalibrationIndividual::setFitness ( double  fitness  )  [inline]

The function sets the fitness of the individual.

Parameters:
fitness The fitness.

Definition at line 81 of file BB2004Calibrator.h.


Member Data Documentation

double CalibrationIndividual::fitness [private]

The fitness of this individual.

Definition at line 39 of file BB2004Calibrator.h.

Referenced by CalibrationIndividual(), extrapolate(), getFitness(), init(), and interpolate().

double CalibrationIndividual::genes[numOfGenes] [private]

The genes.

Definition at line 38 of file BB2004Calibrator.h.

Referenced by dump(), extrapolate(), init(), interpolate(), mutate(), and select().

double CalibrationIndividual::geneScale[numOfGenes] [static, private]

An array that estimates the range of value of a certain gene.

Definition at line 37 of file BB2004Calibrator.h.


The documentation for this class was generated from the following files:
Generated on Thu Dec 7 01:19:37 2006 for DT2005.panorama by  doxygen 1.4.7