eoCollapseSubtreeMutation(3)

NAME
eoCollapseSubtreeMutation - eoCollapseSubtree --> replace a subtree with a randomly chosen terminal

SYNOPSIS

#include <gp/eoParseTreeOp.h>

Inherits eoMonOp< eoParseTree< FType, Node > >.

  Public Types
typedef eoParseTree< FType, Node > EoType

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

  Private Attributes
unsigned max_length
eoInit< EoType > & initializer

Detailed Description

  template<class FType, class Node> class eoCollapseSubtreeMutation< FType, Node >
eoCollapseSubtree --> replace a subtree with a randomly chosen terminal

Definition at line 272 of file eoParseTreeOp.h.

Constructor & Destructor Documentation

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

Constructor.

Parameters:
    _init An instantiation of eoGpDepthInitializer
    _max_length the maximum size of an individual

Definition at line 282 of file eoParseTreeOp.h.

Member Function Documentation

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

Mutate an individual.

Parameters:
    _eo1 The individual that is to be changed

Definition at line 295 of file eoParseTreeOp.h.

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

Author

Generated automatically by Doxygen for EO from the source code.