#include <GLCrossoverVectorKeepMatching.h>
Public Member Functions | |
GLCrossoverVectorKeepMatching () | |
virtual | ~GLCrossoverVectorKeepMatching () |
virtual void | makeOffsprings (const vector< GLBaseOrganism * > &parents, vector< GLBaseOrganism * > &children) |
Definition at line 13 of file GLCrossoverVectorKeepMatching.h.
GLCrossoverVectorKeepMatching< T >::GLCrossoverVectorKeepMatching | ( | ) | [inline] |
Simple constructor.
Definition at line 19 of file GLCrossoverVectorKeepMatching.h.
virtual GLCrossoverVectorKeepMatching< T >::~GLCrossoverVectorKeepMatching | ( | ) | [inline, virtual] |
Destructor, destroys everything.
Definition at line 24 of file GLCrossoverVectorKeepMatching.h.
void GLCrossoverVectorKeepMatching< T >::makeOffsprings | ( | const vector< GLBaseOrganism * > & | parents, | |
vector< GLBaseOrganism * > & | children | |||
) | [inline, virtual] |
Creates an offspring from the vector of parents. Takes 2 vector-based organisms and creates children by keeping matching genes in their place and randomly shuffling others.
parents | vector of parents. | |
children | vector of new organisms obtained from parents. Previous content will not be preserved. |
Implements GLBaseCrossover.
Definition at line 20 of file GLCrossoverVectorKeepMatching.cpp.