Evocosm - A C++ Framework for Evolutionary Computing

Main Index

Created by Scott Robert Ladd at Coyote Gulch Productions.


Public Member Functions | List of all members
libevocosm::mutator< OrganismType > Class Template Referenceabstract

Mutates organisms. More...

#include <mutator.h>

Inheritance diagram for libevocosm::mutator< OrganismType >:
libevocosm::globals

Public Member Functions

virtual ~mutator ()
 Virtual destructor. More...
 
virtual void mutate (vector< OrganismType > &a_population)=0
 Mutate a set of organisms. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from libevocosm::globals
static size_t rand_index (size_t n)
 Static function to allow use of g_random function pointer in random_shuffle.
 
static void set_seed (uint32_t a_seed)
 Set the seed for the random number generator.
 
static uint32_t get_seed ()
 Set the seed for the random number generator.
 
static std::string version ()
 Get version number.
 
- Static Protected Attributes inherited from libevocosm::globals
static prng g_random
 A shared random number generator.
 
static std::string g_version
 Version number.
 

Detailed Description

template<class OrganismType>
class libevocosm::mutator< OrganismType >

A mutator applies mutations (random, usually small changes) to a set of organisms. Mutation is highly dependent on the type of organism. In traditional genetic algorithms, a mutation flips one or more bits in an integer (i.e., chromosome). Evolving a path for the Traveling Salesman Problem involves complex mutations that maintain valid permutations of destination points.

Parameters
OrganismType- The type of organism

Constructor & Destructor Documentation

template<class OrganismType>
virtual libevocosm::mutator< OrganismType >::~mutator ( )
inlinevirtual

A virtual destructor. By default, it does nothing; this is a placeholder that identifies this class as a potential base, ensuring that objects of a derived class will have their destructors called if they are destroyed through a base-class pointer.

Member Function Documentation

template<class OrganismType>
virtual void libevocosm::mutator< OrganismType >::mutate ( vector< OrganismType > &  a_population)
pure virtual

Mutates some (maybe none, maybe all) organisms in a given set.

Parameters
a_population- Set of organisms to be mutated

Implemented in libevocosm::function_mutator.


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

© 1996-2005 Scott Robert Ladd. All rights reserved.
HTML documentation generated by Dimitri van Heesch's excellent Doxygen tool.