30#ifndef ROOT_TMVA_BinaryTree
31#define ROOT_TMVA_BinaryTree
59 std::ostream& operator<< ( std::ostream& os,
const BinaryTree& tree );
101 virtual void Print( std::ostream& os )
const;
103 virtual void*
AddXMLTo(
void* parent)
const;
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
#define ClassDef(name, id)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
#define TMVA_VERSION_CODE
Base class for BinarySearch and Decision Trees.
UInt_t fDepth
maximal depth in tree reached
UInt_t CountNodes(Node *n=nullptr)
return the number of nodes in the tree. (make a new count --> takes time)
Node * GetLeftDaughter(Node *n)
get left daughter node current node "n"
Node * GetRightDaughter(Node *n)
get right daughter node current node "n"
virtual void * AddXMLTo(void *parent) const
add attributes to XML
BinaryTree(void)
constructor for a yet "empty" tree. Needs to be filled afterwards
void DeleteNode(Node *)
protected, recursive, function used by the class destructor and when Pruning
virtual BinaryTree * CreateTree() const =0
UInt_t fNNodes
total number of nodes in the tree (counted)
virtual Node * CreateNode(UInt_t size=0) const =0
virtual const char * ClassName() const =0
UInt_t GetTotalTreeDepth() const
void SetTotalTreeDepth(Int_t depth)
virtual Node * GetRoot() const
Node * fRoot
the root node of the tree the tree only has it's root node, the "daughters" are taken care of by the ...
friend std::istream & operator>>(std::istream &istr, BinaryTree &tree)
friend std::ostream & operator<<(std::ostream &os, const BinaryTree &tree)
virtual void Print(std::ostream &os) const
recursively print the tree
virtual ~BinaryTree()
destructor (deletes the nodes and "events" if owned by the tree
virtual void ReadXML(void *node, UInt_t tmva_Version_Code=262657)
read attributes from XML
virtual void Read(std::istream &istr, UInt_t tmva_Version_Code=262657)
Read the binary tree from an input stream.
ostringstream derivative to redirect and format output
Node for the BinarySearch or Decision Trees.
create variable transformations
std::istream & operator>>(std::istream &istr, BinaryTree &tree)