ROOT logo
ROOT » TMVA » TMVA::BinaryTree

class TMVA::BinaryTree


Base class for BinarySearch and Decision Trees

Function Members (Methods)

    This is an abstract class, constructors will not be documented.
    Look at the header to check for available constructors.

virtual void*AddXMLTo(void* parent) const
static TClass*Class()
virtual const char*ClassName() const
UInt_tCountNodes(TMVA::Node* n = NULL)
static TMVA::BinaryTree*CreateFromXML(void* node)
virtual TMVA::Node*CreateNode(UInt_t size = 0) const
virtual TMVA::BinaryTree*CreateTree() const
TMVA::Node*GetLeftDaughter(TMVA::Node* n)
UInt_tGetNNodes() const
TMVA::Node*GetRightDaughter(TMVA::Node* n)
TMVA::Node*GetRoot() const
UInt_tGetTotalTreeDepth() const
virtual TClass*IsA() const
TMVA::BinaryTree&operator=(const TMVA::BinaryTree&)
virtual voidPrint(ostream& os) const
virtual voidRead(istream& istr)
virtual voidReadXML(void* node)
voidSetRoot(TMVA::Node* r)
voidSetTotalTreeDepth(Int_t depth)
voidSetTotalTreeDepth(TMVA::Node* n = NULL)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
TMVA::MsgLogger&Log() const

Data Members

UInt_tfDepthmaximal depth in tree reached
TMVA::MsgLogger*fLoggermessage loggera
UInt_tfNNodestotal number of nodes in the tree (counted)
TMVA::Node*fRootthe root node of the tree

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

~BinaryTree( void )
destructor (deletes the nodes and "events" if owned by the tree
void DeleteNode(TMVA::Node* )
 protected, recursive, function used by the class destructor and when Pruning
TMVA::Node* GetLeftDaughter(TMVA::Node* n)
 get left daughter node current node "n"
TMVA::Node* GetRightDaughter(TMVA::Node* n)
 get right daughter node current node "n"
UInt_t CountNodes(TMVA::Node* n = NULL)
 return the number of nodes in the tree. (make a new count --> takes time)
void Print(ostream& os) const
 recursively print the tree
void* AddXMLTo(void* parent) const
 add attributes to XML
void ReadXML(void* node)
 read attributes from XML
TMVA::BinaryTree* CreateFromXML(void* node)
 re-create a new tree (decision tree or search tree) from XML
void Read(istream& istr)
 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
void SetTotalTreeDepth( Node *n)
 descend a tree to find all its leaf nodes, fill max depth reached in the
 tree at the same time.
Node* CreateNode(UInt_t size = 0) const
BinaryTree* CreateTree() const
const char* ClassName() const
void SetRoot(TMVA::Node* r)
 set the root node of the tree
{ fRoot = r; }
Node* GetRoot() const
 Retrieves the address of the root node
{ return fRoot; }
UInt_t GetNNodes() const
 get number of Nodes in the Tree as counted while booking the nodes;
{ return fNNodes; }
UInt_t GetTotalTreeDepth() const
{ return fDepth; }
void SetTotalTreeDepth( Int_t depth )
{ fDepth = depth; }