EvolvingObjects
eoSwapMutation< Chrom > Class Template Reference

Swap two components of a chromosome. More...

#include <eoSwapMutation.h>

Inheritance diagram for eoSwapMutation< Chrom >:
eoMonOp< Chrom > eoOp< Chrom > eoUF< Chrom &, bool > eoFunctorBase unary_function

List of all members.

Public Member Functions

 eoSwapMutation (const unsigned _howManySwaps=1)
 CTor.
virtual std::string className () const
 The class name.
bool operator() (Chrom &chrom)
 Swap two components of the given chromosome.

Private Attributes

unsigned int howManySwaps

Detailed Description

template<class Chrom>
class eoSwapMutation< Chrom >

Swap two components of a chromosome.

Examples:
t-eoSwapMutation.cpp.

Definition at line 40 of file eoSwapMutation.h.


Member Function Documentation

template<class Chrom>
bool eoSwapMutation< Chrom >::operator() ( Chrom &  chrom) [inline, virtual]

Swap two components of the given chromosome.

Parameters:
chromThe cromosome which is going to be changed.

Implements eoUF< Chrom &, bool >.

Definition at line 59 of file eoSwapMutation.h.

References eoRng::random().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Friends