EvolvingObjects
eoParseTreeDepthInit< FType, Node > Class Template Reference

eoParseTreeDepthInit : the initializer class for eoParseTree More...

#include <gp/eoParseTreeDepthInit.h>

Inheritance diagram for eoParseTreeDepthInit< FType, Node >:
eoInit< eoParseTree< FType, Node > > eoUF< eoParseTree< FType, Node > &, void > eoFunctorBase unary_function

List of all members.

Classes

struct  lt_arity

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.
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< Node > initializor
bool grow
bool ramped_half_and_half
unsigned current_depth

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.

Parameters:
_max_depthThe maximum depth of a tree
_initializorA std::vector containing the possible nodes
_growFalse results in a full tree, True result is a randomly grown tree
_ramped_half_and_halfTrue results in Ramped Half and Half Initialization

Definition at line 69 of file eoParseTreeDepthInit.h.


Member Function Documentation

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

initialize a tree

Parameters:
_tree: the tree to be initialized

Definition at line 96 of file eoParseTreeDepthInit.h.


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