![]() |
ROOT 6.07/09 Reference Guide |
Definition at line 68 of file BinaryTree.h.
Public Member Functions | |
BinaryTree (void) | |
constructor for a yet "empty" tree. Needs to be filled afterwards More... | |
virtual | ~BinaryTree () |
destructor (deletes the nodes and "events" if owned by the tree More... | |
virtual void * | AddXMLTo (void *parent) const |
add attributes to XML More... | |
virtual const char * | ClassName () const =0 |
UInt_t | CountNodes (Node *n=NULL) |
return the number of nodes in the tree. (make a new count –> takes time) More... | |
virtual Node * | CreateNode (UInt_t size=0) const =0 |
virtual BinaryTree * | CreateTree () const =0 |
Node * | GetLeftDaughter (Node *n) |
get left daughter node current node "n" More... | |
UInt_t | GetNNodes () const |
Node * | GetRightDaughter (Node *n) |
get right daughter node current node "n" More... | |
virtual Node * | GetRoot () const |
UInt_t | GetTotalTreeDepth () const |
virtual void | Print (std::ostream &os) const |
recursively print the tree More... | |
virtual void | Read (std::istream &istr, UInt_t tmva_Version_Code=TMVA_VERSION_CODE) |
Read the binary tree from an input stream. More... | |
virtual void | ReadXML (void *node, UInt_t tmva_Version_Code=TMVA_VERSION_CODE) |
read attributes from XML More... | |
void | SetRoot (Node *r) |
void | SetTotalTreeDepth (Int_t depth) |
void | SetTotalTreeDepth (Node *n=NULL) |
descend a tree to find all its leaf nodes, fill max depth reached in the tree at the same time. More... | |
Protected Member Functions | |
void | DeleteNode (Node *) |
protected, recursive, function used by the class destructor and when Pruning More... | |
MsgLogger & | Log () const |
Protected Attributes | |
UInt_t | fDepth |
UInt_t | fNNodes |
Node * | fRoot |
Friends | |
std::ostream & | operator<< (std::ostream &os, const BinaryTree &tree) |
std::istream & | operator>> (std::istream &istr, BinaryTree &tree) |
#include <TMVA/BinaryTree.h>
TMVA::BinaryTree::BinaryTree | ( | void | ) |
constructor for a yet "empty" tree. Needs to be filled afterwards
Definition at line 56 of file BinaryTree.cxx.
|
virtual |
destructor (deletes the nodes and "events" if owned by the tree
Definition at line 66 of file BinaryTree.cxx.
add attributes to XML
Definition at line 135 of file BinaryTree.cxx.
|
pure virtual |
Implemented in TMVA::DecisionTree, and TMVA::BinarySearchTree.
UInt_t TMVA::BinaryTree::CountNodes | ( | TMVA::Node * | n = NULL | ) |
return the number of nodes in the tree. (make a new count –> takes time)
Definition at line 104 of file BinaryTree.cxx.
Implemented in TMVA::DecisionTree, and TMVA::BinarySearchTree.
|
pure virtual |
Implemented in TMVA::DecisionTree, and TMVA::BinarySearchTree.
|
protected |
protected, recursive, function used by the class destructor and when Pruning
Definition at line 75 of file BinaryTree.cxx.
TMVA::Node * TMVA::BinaryTree::GetLeftDaughter | ( | Node * | n | ) |
get left daughter node current node "n"
Definition at line 88 of file BinaryTree.cxx.
|
inline |
Definition at line 92 of file BinaryTree.h.
TMVA::Node * TMVA::BinaryTree::GetRightDaughter | ( | Node * | n | ) |
get right daughter node current node "n"
Definition at line 96 of file BinaryTree.cxx.
|
inlinevirtual |
Reimplemented in TMVA::DecisionTree.
Definition at line 89 of file BinaryTree.h.
|
inline |
Definition at line 99 of file BinaryTree.h.
|
protected |
Definition at line 236 of file BinaryTree.cxx.
|
virtual |
recursively print the tree
Definition at line 126 of file BinaryTree.cxx.
|
virtual |
Read the binary tree from an input stream.
The input stream format depends on the tree type, it is defined be the node of the tree
Definition at line 170 of file BinaryTree.cxx.
|
virtual |
read attributes from XML
Definition at line 145 of file BinaryTree.cxx.
Definition at line 86 of file BinaryTree.h.
Definition at line 101 of file BinaryTree.h.
descend a tree to find all its leaf nodes, fill max depth reached in the tree at the same time.
Definition at line 214 of file BinaryTree.cxx.
|
friend |
|
friend |
|
protected |
Definition at line 124 of file BinaryTree.h.
|
protected |
Definition at line 123 of file BinaryTree.h.
|
protected |
Definition at line 116 of file BinaryTree.h.