Robot Simulator of the Robotics Group for Self-Organization of Control: SingletonIndividualFactory Class Reference

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages
- Examples

- Search for |

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# SingletonIndividualFactory Class Reference

this is a factory for the individual class. More...

`#include <SingletonIndividualFactory.h>`

Collaboration diagram for SingletonIndividualFactory:

[legend]
List of all members.

## Public Member Functions
Individual * | createIndividual (std::string name=createName()) const
| random creation by random creation of Gen for every GenPrototype.
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
## Static Public Member Functions
static SingletonIndividualFactory * | getInstance (void)
| this method gives the one and only existing factory back.
static void | destroyFactory (void)
| destroy the only existing factory

## Detailed Description

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.

## Member Function Documentation

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

Parameters:

  | 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

Returns:
  (Individual*) the new individual

Individual * createIndividual | ( | std::string | name = `createName()` | ) | const

random creation by random creation of Gen for every GenPrototype.

Parameters:

  | name | (string) the name of the new individual. Will be automaticly created

Returns:
  (Individual*) the new individual

static void destroyFactory | ( | void |  | ) | `[inline, static]`

destroy the only existing factory

static SingletonIndividualFactory* getInstance | ( | void |  | ) | `[inline, static]`

this method gives the one and only existing factory back.

Returns:
  (SingletonIndividualFactory*) the factory

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

- SingletonIndividualFactory.h
- SingletonIndividualFactory.cpp