GLCrossoverOnePoint Class Reference

#include <GLCrossoverOnePoint.h>

Inheritance diagram for GLCrossoverOnePoint:

GLBaseCrossover

List of all members.

Public Member Functions

 GLCrossoverOnePoint ()
virtual ~GLCrossoverOnePoint ()
virtual void makeOffsprings (const vector< GLBaseOrganism * > &parents, vector< GLBaseOrganism * > &children)


Detailed Description

Standard one-point crossover which choses the point in one parent and then swaps the tails with another. This crossover can be applied to all organisms which implement GLInterfaceSwapTails

Definition at line 12 of file GLCrossoverOnePoint.h.


Constructor & Destructor Documentation

GLCrossoverOnePoint::GLCrossoverOnePoint (  )  [inline]

Simple empty constructor.

Definition at line 18 of file GLCrossoverOnePoint.h.

virtual GLCrossoverOnePoint::~GLCrossoverOnePoint (  )  [inline, virtual]

Destructor -- destroys everything.

Definition at line 23 of file GLCrossoverOnePoint.h.


Member Function Documentation

void GLCrossoverOnePoint::makeOffsprings ( const vector< GLBaseOrganism * > &  parents,
vector< GLBaseOrganism * > &  children 
) [virtual]

Creates an 2 offsprings from 2 parents by randomly swapping tails.

Parameters:
parents vector of parents.
children vector of new organisms obtained from parents. Previous content will not be preserved.

Implements GLBaseCrossover.

Definition at line 13 of file GLCrossoverOnePoint.cpp.


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

Generated on Sat Jun 13 13:58:08 2009 for GenLib by  doxygen 1.5.9