#include <GLVariatorStandard.h>
Public Member Functions | |
GLVariatorStandard (GLBaseMutator *mutator) | |
virtual | ~GLVariatorStandard () |
virtual int | applyMutator (GLBasePopulation *population, GLBaseOrganismStorage *organisms, GLBaseOrganismStorage *mutants, GLConstants::TStorageFilling fill=GLConstants::APPEND, GLConstants::TTwinsFlags twins=GLConstants::NO_TWINS, int max_mutants=-1) |
Definition at line 12 of file GLVariatorStandard.h.
GLVariatorStandard::GLVariatorStandard | ( | GLBaseMutator * | mutator | ) |
Constructor. Takes the pointer to mutator operator. Note, that this mutator will be destroyed with this object.
mutator | mutator operator. |
Definition at line 12 of file GLVariatorStandard.cpp.
GLVariatorStandard::~GLVariatorStandard | ( | ) | [virtual] |
Destroys the mutator operator (in base destructor).
Definition at line 20 of file GLVariatorStandard.cpp.
int GLVariatorStandard::applyMutator | ( | GLBasePopulation * | population, | |
GLBaseOrganismStorage * | organisms, | |||
GLBaseOrganismStorage * | mutants, | |||
GLConstants::TStorageFilling | fill = GLConstants::APPEND , |
|||
GLConstants::TTwinsFlags | twins = GLConstants::NO_TWINS , |
|||
int | max_mutants = -1 | |||
) | [virtual] |
Applies mutator to the set container of organisms.
population | population to which mutated organisms belong -- mainly to check for uniqueness of the mutants. | |
organisms | container with organisms. | |
mutants | where mutated organisms will be added. | |
fill | when equal to APPEND the container with mutants will be appended with new organisms, when REPLACE - mutants will be emptied at the beginning. | |
twins | when NO_TWINS only unique organisms will be added. |
max_mutants | maximum number of mutans which can be produced by mutator. When < 0 the number of mutants produced determined only by mutation rate. |
population | population to which mutated organisms belong -- mainly to check for uniqueness of the mutants. | |
organisms | container with organisms. | |
mutants | where mutated organisms will be added. | |
fill | when equal to APPEND the container with mutants will be appended with new organisms, when REPLACE - mutants will be emptied at the beginning. | |
twins | when NO_TWINS only unique organisms will be added. | |
max_mutants | maximum number of mutants to be created, if < 0 -- number is limited only by the mutation algorithm used. | |
max_mutants | maximum number of mutans which can be produced by mutator. When < 0 the number of mutants produced determined only by mutation rate. |
Implements GLBaseVariator.
Definition at line 42 of file GLVariatorStandard.cpp.