GLMutatorShuffling Class Reference

#include <GLMutatorShuffling.h>

Inheritance diagram for GLMutatorShuffling:

GLBaseMutator

List of all members.

Classes

struct  TParameters

Public Member Functions

 GLMutatorShuffling (double mutation_rate, const GLMutatorShuffling::TParameters *const parameters)
 GLMutatorShuffling (const GLMutatorShuffling &source)
virtual ~GLMutatorShuffling ()
virtual GLBaseMutatorcopy () const
virtual bool mutateOrganism (GLBaseOrganism *organism)


Detailed Description

This mutator randomly choses random number of genes and shuffles them (yes, randomly).

Definition at line 11 of file GLMutatorShuffling.h.


Constructor & Destructor Documentation

GLMutatorShuffling::GLMutatorShuffling ( double  mutation_rate,
const GLMutatorShuffling::TParameters *const   parameters 
)

Constructor. Sets parameters.

Parameters:
mutation_rate probability that organism will be mutated.
parameters structure which contains maximum number of genes to shuffle and flag which determines how this number is chosen.

Definition at line 18 of file GLMutatorShuffling.cpp.

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

Copying constructor.

Parameters:
source where the data are copied from.

Definition at line 28 of file GLMutatorShuffling.h.

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

Destructor -- destroys everything.

Definition at line 35 of file GLMutatorShuffling.h.


Member Function Documentation

virtual GLBaseMutator* GLMutatorShuffling::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 42 of file GLMutatorShuffling.h.

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

Performs the mutation on the organism. Chooses the number of genes to shuffle, which genes to shuffle and then shuffles them. If passed organism was changed (mutated) returns true, otherwise returns false.

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

organism did not mutated.

Implements GLBaseMutator.

Definition at line 34 of file GLMutatorShuffling.cpp.


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

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