EvolvingObjects
eoBranchMutation< FType, Node > Class Template Reference

eoBranchMutation --> replace a subtree with a randomly created subtree More...

#include <gp/eoParseTreeOp.h>

Inheritance diagram for eoBranchMutation< FType, Node >:
eoMonOp< eoParseTree< FType, Node > > eoOp< eoParseTree< FType, Node > > eoUF< eoParseTree< FType, Node > &, bool > eoFunctorBase unary_function

List of all members.

Public Types

typedef eoParseTree< FType, Node > EoType

Public Member Functions

 eoBranchMutation (eoInit< EoType > &_init, unsigned _max_length)
 Constructor.
virtual std::string className () const
 the class name
virtual ~eoBranchMutation ()
 Dtor.
bool operator() (EoType &_eo1)
 Mutate an individual.

Private Attributes

unsigned max_length
eoInit< EoType > & initializer

Detailed Description

template<class FType, class Node>
class eoBranchMutation< FType, Node >

eoBranchMutation --> replace a subtree with a randomly created subtree

Examples:
t-eoSymreg.cpp.

Definition at line 87 of file eoParseTreeOp.h.


Constructor & Destructor Documentation

template<class FType, class Node>
eoBranchMutation< FType, Node >::eoBranchMutation ( eoInit< EoType > &  _init,
unsigned  _max_length 
) [inline]

Constructor.

Parameters:
_initAn instantiation of eoGpDepthInitializer
_max_lengththe maximum size of an individual

Definition at line 97 of file eoParseTreeOp.h.


Member Function Documentation

template<class FType, class Node>
bool eoBranchMutation< FType, Node >::operator() ( EoType _eo1) [inline]

Mutate an individual.

Parameters:
_eo1The individual that is to be changed

Definition at line 111 of file eoParseTreeOp.h.

References eoParseTree< FType, Node >::pruneTree(), and eoRng::random().


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