117 n+= this->
GetLeft()->CountMeAndAllDaughters();
119 n+= this->
GetRight()->CountMeAndAllDaughters();
139 if (node!=NULL) node->
Print(os);
148 std::stringstream s(
"");
167 std::stringstream s(content);
176 n->ReadXML(ch, tmva_Version_Code);
177 if (
n->GetPos()==
'l') { this->
SetLeft(
n); }
178 else if(
n->GetPos()==
'r') { this->
SetRight(
n); }
180 std::cout <<
"neither left nor right" << std::endl;
static ROOT::Experimental::RTreeMapBase::Node CreateNode(const ROOT::Experimental::RNTupleInspector &insp, const ROOT::RFieldDescriptor &fldDesc, std::uint64_t childrenIdx, std::uint64_t nChildren, ROOT::DescriptorId_t rootId, size_t rootSize)
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
Node for the BinarySearch or Decision Trees.
static Int_t fgCount
counter of all nodes present.. for debug.. to spot memory leaks...
virtual void ReadContent(std::stringstream &s)=0
Node * fLeft
pointers to the two "daughter" nodes
virtual void Print(std::ostream &os) const =0
char fPos
position, i.e. it is a left (l) or right (r) daughter
virtual Node * GetLeft() const
Node * fParent
the previous (parent) node
virtual TMVA::BinaryTree * GetParentTree() const
virtual void SetRight(Node *r)
virtual void SetLeft(Node *l)
virtual void AddContentToNode(std::stringstream &s) const =0
void * AddXMLTo(void *parent) const
add attributes to XML
int GetCount()
returns the global number of instantiated nodes
Int_t CountMeAndAllDaughters() const
recursively go through the part of the tree below this node and count all daughters
virtual void ReadAttributes(void *node, UInt_t tmva_Version_Code=262657)=0
UInt_t fDepth
depth of the node within the tree (seen from root node)
virtual ~Node()
node destructor
Node * fRight
pointers to the two "daughter" nodes
virtual void AddAttributesToNode(void *node) const =0
virtual Node * GetRight() const
void ReadXML(void *node, UInt_t tmva_Version_Code=262657)
read attributes from XML
BinaryTree * fParentTree
pointer to the parent tree to which the Node belongs
std::ostream & operator<<(std::ostream &os, const BinaryTree &tree)