Robot Simulator of the Robotics Group for Self-Organization of Control
0.8.0
|
this is a factory for the individual class. More...
#include <SingletonIndividualFactory.h>
Public Member Functions | |
Individual * | createIndividual (std::string name=createName()) const |
random creation by random creation of Gen for every GenPrototype. More... | |
Individual * | createIndividual (Individual *individual1, Individual *individual2, RandGen *random, std::string name=createName()) const |
create a new individual by recombination of the gens of there parents More... | |
void | setNumber (int number) |
set the member variable m_number to number More... | |
Static Public Member Functions | |
static SingletonIndividualFactory * | getInstance (void) |
this method gives the one and only existing factory back. More... | |
static void | destroyFactory (void) |
destroy the only existing factory More... | |
this is a factory for the individual class.
It use the SingletonGenFactory to create new individuals. It have 2 methods to create a individual. (random and recombination)
Over this is the class as singleton concepted. Only one Factory for a run.
Individual * createIndividual | ( | std::string | name = createName() | ) | const |
random creation by random creation of Gen for every GenPrototype.
name | (string) the name of the new individual. Will be automaticly created |
Individual * createIndividual | ( | Individual * | individual1, |
Individual * | individual2, | ||
RandGen * | random, | ||
std::string | name = createName() |
||
) | const |
create a new individual by recombination of the gens of there parents
individual1 | (Individual*) parent 1 |
individual2 | (Individual*) parent 2 |
random | (RandGen*) a random generator |
name | (string) the name of the new individual. Will be automaticly created |
|
inlinestatic |
destroy the only existing factory
|
inlinestatic |
this method gives the one and only existing factory back.
|
inline |
set the member variable m_number to number
number | (int) the new value |