GLMutatorGeneMove Class Reference

#include <GLMutatorGeneMove.h>

Inheritance diagram for GLMutatorGeneMove:

GLBaseMutator

List of all members.

Public Member Functions

 GLMutatorGeneMove (double mutationRate=0.5)
 GLMutatorGeneMove (const GLMutatorGeneMove &source)
virtual ~GLMutatorGeneMove ()
virtual GLBaseMutatorcopy () const
virtual bool mutateOrganism (GLBaseOrganism *organism)


Detailed Description

Mutates the organism by moving the gene from one position in organism to another.

Definition at line 10 of file GLMutatorGeneMove.h.


Constructor & Destructor Documentation

GLMutatorGeneMove::GLMutatorGeneMove ( double  mutationRate = 0.5  )  [inline]

Simple constructor.

Parameters:
mutationRate probability that gene will move. Should be in (0; 1) interval.

Definition at line 18 of file GLMutatorGeneMove.h.

GLMutatorGeneMove::GLMutatorGeneMove ( const GLMutatorGeneMove source  )  [inline]

Copying constructor.

Parameters:
source where the data should be copied from.

Definition at line 25 of file GLMutatorGeneMove.h.

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

Destructor. Destroys everything.

Definition at line 31 of file GLMutatorGeneMove.h.


Member Function Documentation

virtual GLBaseMutator* GLMutatorGeneMove::copy (  )  const [inline, virtual]

Creates copy of the current exemplar of the mutator. Should be overloaded in childrens.

Returns:
copy of the current exemplar of the mutator.

Implements GLBaseMutator.

Definition at line 38 of file GLMutatorGeneMove.h.

bool GLMutatorGeneMove::mutateOrganism ( GLBaseOrganism organism  )  [virtual]

Mutator. Passed pointer should point to the class implementing GLMovableGeneInterface. Randomly chooses one gene and moves it to randomly chosen position (it is guaranteed, that new position is different from the current one unless the size of the organisms == 1).

Parameters:
organism pointer to the organism to be mutated.
Returns:
true if organism was mutated and false otherwise.

Implements GLBaseMutator.

Definition at line 19 of file GLMutatorGeneMove.cpp.


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

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