32 #ifndef TREEMACHINE_H__
33 #define TREEMACHINE_H__
73 virtual const char*
get_name()
const {
return "TreeMachine"; }
101 if (!strcmp(
m_root->get_name(),
"TreeMachineNode"))
113 clone_root->data=
m_root->data;
114 clone_root->machine(
m_root->machine());
122 if (!strcmp(
m_root->get_name(),
"TreeMachineNode"))
123 child=
dynamic_cast<node_t*
>(el);
125 child=
dynamic_cast<bnode_t*
>(el);
132 node_t* child_node_copy=clone_child_tree->
get_root();
133 if ((!strcmp(
m_root->get_name(),
"BinaryTreeMachineNode")) && (child_node_copy!=NULL))
134 child_node_copy=
dynamic_cast<bnode_t*
>(child_node_copy);
136 clone_root->add_child(child_node_copy);
CTreeMachineNode< T > node_t
The node of the tree structure forming a TreeMachine The node contains pointer to its parent and poin...
CTreeMachineNode< T > * get_root()
int32_t get_num_elements() const
virtual void store_model_features()
CTreeMachineNode< T > * m_root
void set_root(CTreeMachineNode< T > *root)
Class SGObject is the base class of all shogun objects.
CTreeMachine * clone_tree()
Dynamic array class for CSGObject pointers that creates an array that can be used like a list or an a...
The node of the tree structure forming a TreeMachine The node contains a pointer to its parent and a ...
virtual const char * get_name() const
all of classes and functions are contained in the shogun namespace
CBinaryTreeMachineNode< T > bnode_t
CSGObject * get_element(int32_t index) const
class TreeMachine, a base class for tree based multiclass classifiers. This class is derived from CBa...