#include <GLCrossoverTwoPoints.h>
Public Member Functions | |
GLCrossoverTwoPoints () | |
virtual | ~GLCrossoverTwoPoints () |
virtual void | makeOffsprings (const vector< GLBaseOrganism * > &parents, vector< GLBaseOrganism * > &children) |
Definition at line 10 of file GLCrossoverTwoPoints.h.
GLCrossoverTwoPoints::GLCrossoverTwoPoints | ( | ) | [inline] |
Simple empty constructor.
Definition at line 16 of file GLCrossoverTwoPoints.h.
virtual GLCrossoverTwoPoints::~GLCrossoverTwoPoints | ( | ) | [inline, virtual] |
Destructor. Destroys everything.
Definition at line 20 of file GLCrossoverTwoPoints.h.
void GLCrossoverTwoPoints::makeOffsprings | ( | const vector< GLBaseOrganism * > & | parents, | |
vector< GLBaseOrganism * > & | children | |||
) | [virtual] |
Creates an 2 offsprings from 2 parents by swapping sections bounded by randomly chosen 2 points.
parents | vector of parents. Must contain only 2 elements each of them implementing GLInterfaceSwapSections. | |
children | vector of new organisms obtained from parents. Previous content will not be preserved. |
Implements GLBaseCrossover.
Definition at line 16 of file GLCrossoverTwoPoints.cpp.