template <class GENOME, class NICHEPARS=AutoNichePars> class Niche

Handle class for Niches' manipulation

Public Methods

void NewGeneration()
Create a new generation in the niche.
Niche(GENOME& Problem, int number_elements, const NICHEPARS& npars, const GENOME::Pars& gpars, const ControlPars& cpars)
Build a new niche from scratch
Niche(const Niche& ind)
(ref-counting copy)
Niche& operator=(const Niche& ind)
(ref-counting assignment)
void Recombine(const Niche& other)
Recombine this niche with another one, possibly subtituting most of its elements

Public

Public functions on Niche's:
double MaxFitness()
The fitness of the best element in the niche.
double MinFitness()
The fitness of the worse element in the niche.
double MeanFitness()
Average fitness.
double StdDevFitness()
Standard deviation of the fitnesses.
Individual <GENOME> BestElement()
The best individual in the niche.
Individual <GENOME> Element(int index)
Give access to all the elements in the niche (by value).
Individual <GENOME> & Element(int index)
Give access to all the elements in the niche (by reference).

Documentation

Handle class for Niches' manipulation. The body class is NicheRep.
Niche(GENOME& Problem, int number_elements, const NICHEPARS& npars, const GENOME::Pars& gpars, const ControlPars& cpars)
Build a new niche from scratch. The arguments to provide are:
Parameters:
Problem - an object of the class GENOME, which is itself a template argument. This object holds a functor that implements the objective function, that tells the fitness of individuals.
number_elements - the population of each of the niches
npars - an object containing the parameters that control the operations inside the niche.
gpars - an object containing the parameters that control the genetic operations for the population of this niche.
cp - an optional parameter, where we can specify detailed information for controlling the evolution.

Niche(const Niche& ind)
(ref-counting copy)

Niche& operator=(const Niche& ind)
(ref-counting assignment)

Public functions on Niche's:

double MaxFitness()
The fitness of the best element in the niche.

double MinFitness()
The fitness of the worse element in the niche.

double MeanFitness()
Average fitness.

double StdDevFitness()
Standard deviation of the fitnesses.

Individual <GENOME> BestElement()
The best individual in the niche.

Individual <GENOME> Element(int index)
Give access to all the elements in the niche (by value).

Individual <GENOME> & Element(int index)
Give access to all the elements in the niche (by reference).

void NewGeneration()
Create a new generation in the niche.

void Recombine(const Niche& other)
Recombine this niche with another one, possibly subtituting most of its elements


This class has no child classes.



this page was generated by


Joao Pedro Pedroso
Oct 21, 1997