108 if (n ==
NULL)
return 0 ;
129 os <<
"-1" << std::endl;
192 if (currentNode->
GetPos()==
'l') parent->
SetLeft(currentNode);
196 parent = currentNode;
219 Log() <<
kFATAL <<
"SetTotalTreeDepth: started with undefined ROOT node" <<
Endl;
237 TTHREAD_TLS_DECL_ARG(
MsgLogger,logger,
"BinaryTree");
virtual void * AddXMLTo(void *parent) const
add attributes to XML
virtual void PrintRec(std::ostream &os) const =0
void * AddXMLTo(void *parent) const
add attributes to XML
virtual const char * ClassName() const =0
MsgLogger & Endl(MsgLogger &ml)
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
virtual void SetRight(Node *r)
void DeleteNode(Node *)
protected, recursive, function used by the class destructor and when Pruning
virtual Bool_t ReadDataRecord(std::istream &, UInt_t tmva_Version_Code=TMVA_VERSION_CODE)=0
virtual void SetLeft(Node *l)
virtual Node * GetRight() const
virtual Node * GetLeft() const
void SetTotalTreeDepth(Int_t depth)
void ReadXML(void *node, UInt_t tmva_Version_Code=TMVA_VERSION_CODE)
read attributes from XML
virtual void Print(std::ostream &os) const
recursively print the tree
virtual Node * GetParent() const
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
virtual void SetParent(Node *p)
UInt_t GetTotalTreeDepth() const
virtual Node * CreateNode(UInt_t size=0) const =0
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