eoParseTreeDepthInit< FType, Node > Class Template Reference
[ParseTree]

eoParseTreeDepthInit : the initializer class for eoParseTree More...

#include <gp/eoParseTreeDepthInit.h>

List of all members.

Public Types

typedef eoParseTree< FType,
Node
EoType

Public Member Functions

 eoParseTreeDepthInit (unsigned _max_depth, const std::vector< Node > &_initializor, bool _grow=true, bool _ramped_half_and_half=false)
 Constructor _max_depth The maximum depth of a tree.
virtual std::string className () const
 My class name.
void operator() (EoType &_tree)
 initialize a tree

Private Member Functions

void generate (std::list< Node > &sequence, int the_max, int last_terminal=-1)

Private Attributes

unsigned max_depth
std::vector< Nodeinitializor
bool grow
bool ramped_half_and_half
unsigned current_depth

Classes

struct  lt_arity


Detailed Description

template<class FType, class Node>
class eoParseTreeDepthInit< FType, Node >

eoParseTreeDepthInit : the initializer class for eoParseTree

Definition at line 48 of file eoParseTreeDepthInit.h.


Constructor & Destructor Documentation

template<class FType, class Node>
eoParseTreeDepthInit< FType, Node >::eoParseTreeDepthInit ( unsigned  _max_depth,
const std::vector< Node > &  _initializor,
bool  _grow = true,
bool  _ramped_half_and_half = false 
) [inline]

Constructor _max_depth The maximum depth of a tree.

Parameters:
_initializor A std::vector containing the possible nodes
_grow False results in a full tree, True result is a randomly grown tree
_ramped_half_and_half True results in Ramped Half and Half Initialization

Definition at line 69 of file eoParseTreeDepthInit.h.

References eoParseTreeDepthInit< FType, Node >::initializor.


Member Function Documentation

template<class FType, class Node>
void eoParseTreeDepthInit< FType, Node >::operator() ( EoType _tree  )  [inline, virtual]

initialize a tree

Parameters:
_tree : the tree to be initialized

Implements eoUF< eoParseTree< FType, Node > &, void >.

Definition at line 96 of file eoParseTreeDepthInit.h.

References eoParseTreeDepthInit< FType, Node >::current_depth, eoParseTreeDepthInit< FType, Node >::generate(), eoParseTreeDepthInit< FType, Node >::grow, eoParseTreeDepthInit< FType, Node >::max_depth, eoParseTreeDepthInit< FType, Node >::ramped_half_and_half, and gp_parse_tree::parse_tree< T >::swap().


The documentation for this class was generated from the following file:
Generated on Thu Apr 19 11:02:32 2007 for EO by  doxygen 1.4.7