ROOT » TMVA » TMVA » TMVA::BinaryTree

class TMVA::BinaryTree


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.

public:
virtual~BinaryTree()
virtual void*AddXMLTo(void* parent) const
TMVA::BinaryTreeBinaryTree()
TMVA::BinaryTreeBinaryTree(const TMVA::BinaryTree&)
static TClass*Class()
virtual const char*ClassName() const
UInt_tCountNodes(TMVA::Node* n = __null)
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)
virtual 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, UInt_t tmva_Version_Code = 262657)
virtual voidReadXML(void* node, UInt_t tmva_Version_Code = 262657)
voidSetRoot(TMVA::Node* r)
voidSetTotalTreeDepth(Int_t depth)
voidSetTotalTreeDepth(TMVA::Node* n = __null)
virtual voidShowMembers(TMemberInspector& insp) const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
protected:
voidDeleteNode(TMVA::Node*)
TMVA::MsgLogger&Log() const

Data Members

protected:
UInt_tfDepthmaximal depth in tree reached
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(const TMVA::BinaryTree& )
 constructor for a yet "empty" tree. Needs to be filled afterwards
~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, UInt_t tmva_Version_Code = 262657)
 read attributes from XML
void Read(istream& istr, UInt_t tmva_Version_Code = 262657)
 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.
TMVA::MsgLogger& Log() const
BinaryTree(const TMVA::BinaryTree& )
 or a tree with Root node "n", any daughters of this node are automatically in the tree
Node* CreateNode(UInt_t size = 0) const
BinaryTree* CreateTree() const
      virtual BinaryTree* CreateFromXML(void* node, UInt_t tmva_Version_Code = TMVA_VERSION_CODE) = 0;
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; }