Public Member Functions | Static Protected Member Functions | Protected Attributes

Clonalg Class Reference
[AlgorithmsSequential algorithms]

Clonal Selection Algorithm (see e.g. http://en.wikipedia.org/wiki/Clonal_Selection_Algorithm).This CLONALG implements:

More...

#include <AlgClonalg.h>

Inheritance diagram for Clonalg:
Algorithm

List of all members.

Public Member Functions

void registerParameters (StateP state)
 Register algorithm's parameters (if any).
bool initialize (StateP state)
 Initialize the algorithm, read parameters from the system, do a sanity check.
bool advanceGeneration (StateP state, DemeP deme)
 Perform a single generation on a single deme.
bool markAntibodies (DemeP deme)
 mark antibodies so the alg can know which clone belongs to which parent Antibody
bool cloningPhase (StateP state, DemeP deme, std::vector< IndividualP > &clones)
bool hypermutationPhase (StateP state, DemeP deme, std::vector< IndividualP > &clones)
bool selectionPhase (StateP state, DemeP deme, std::vector< IndividualP > &clones)
bool birthPhase (StateP state, DemeP deme, std::vector< IndividualP > &clones)
bool replacePopulation (StateP state, DemeP deme, std::vector< IndividualP > &clones)
 replace population with the contents of clones vector

Static Protected Member Functions

static bool sortPopulationByFitness (IndividualP ab1, IndividualP ab2)
 sort vector of antibodies in regards to their fitness
static bool sortPopulationByParentAndFitness (IndividualP ab1, IndividualP ab2)
 sort vector of antibodies first by their antibody parents and then by their fitness

Protected Attributes

double ubound
double lbound
uint dimension
bool areGenotypesAdded_
uint n
 number of antibodies cloned every generation
double beta
 parameter which determines the number of clones for every antibody
double c
 mutation parameter
double d
 fraction of population regenerated every generation
std::string cloningVersion
 specifies whether to use static or proportional cloning
std::string selectionScheme
 specifies which selection scheme to use CLONALG1 or CLONALG2

Detailed Description

Clonal Selection Algorithm (see e.g. http://en.wikipedia.org/wiki/Clonal_Selection_Algorithm).

This CLONALG implements:

CLONALG algorithm accepts only a single FloatingPoint genotype. Additionally, if chosen, selectionScheme CLONALG1 adds a FloatingPoint genotype (parentAntibody) to mark which clone came from which antibodies.

Definition at line 24 of file AlgClonalg.h.


Member Function Documentation

bool Clonalg::advanceGeneration ( StateP  ,
DemeP   
) [virtual]

Perform a single generation on a single deme.

Must be implemented by a specific algorithm class

Implements Algorithm.

Definition at line 123 of file AlgClonalg.cpp.

bool Clonalg::initialize ( StateP   )  [virtual]

Initialize the algorithm, read parameters from the system, do a sanity check.

Called by the system before the algorithm starts (Algorithm::advanceGeneration)

Reimplemented from Algorithm.

Definition at line 33 of file AlgClonalg.cpp.

void Clonalg::registerParameters ( StateP   )  [virtual]

Register algorithm's parameters (if any).

Called by the system before algorithm initialization (Algorithm::initialize)

Reimplemented from Algorithm.

Definition at line 16 of file AlgClonalg.cpp.


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