30 #ifndef ROOT_TMVA_BinaryTree 31 #define ROOT_TMVA_BinaryTree 33 #ifndef ROOT_TMVA_Version 50 #ifndef ROOT_TMVA_Node 65 std::ostream&
operator<< ( std::ostream& os,
const BinaryTree&
tree );
83 virtual const char*
ClassName()
const = 0;
107 virtual void Print( std::ostream& os )
const;
109 virtual void*
AddXMLTo(
void* parent)
const;
virtual void * AddXMLTo(void *parent) const
add attributes to XML
#define TMVA_VERSION_CODE
virtual const char * ClassName() const =0
virtual void Read(std::istream &istr, UInt_t tmva_Version_Code=TMVA_VERSION_CODE)
Read the binary tree from an input stream.
virtual ~BinaryTree()
destructor (deletes the nodes and "events" if owned by the tree
void DeleteNode(Node *)
protected, recursive, function used by the class destructor and when Pruning
virtual BinaryTree * CreateTree() const =0
#define ClassDef(name, id)
void SetTotalTreeDepth(Int_t depth)
virtual void Print(std::ostream &os) const
recursively print the tree
friend std::istream & operator>>(std::istream &istr, BinaryTree &tree)
virtual void ReadXML(void *node, UInt_t tmva_Version_Code=TMVA_VERSION_CODE)
read attributes from XML
std::ostream & operator<<(std::ostream &os, const BinaryTree &tree)
print the tree recursinvely using the << operator
std::istream & operator>>(std::istream &istr, BinaryTree &tree)
read the tree from an std::istream
BinaryTree(void)
constructor for a yet "empty" tree. Needs to be filled afterwards
UInt_t GetTotalTreeDepth() const
virtual Node * CreateNode(UInt_t size=0) const =0
friend std::ostream & operator<<(std::ostream &os, const BinaryTree &tree)
UInt_t CountNodes(Node *n=NULL)
return the number of nodes in the tree. (make a new count –> takes time)
Abstract ClassifierFactory template that handles arbitrary types.
Node * GetRightDaughter(Node *n)
get right daughter node current node "n"
Node * GetLeftDaughter(Node *n)
get left daughter node current node "n"
virtual Node * GetRoot() const