70 fDepth(
p->GetDepth() + 1),
71 fParentTree(
p->GetParentTree())
74 if (
fPos ==
'l' )
p->SetLeft(
this);
75 else if (
fPos ==
'r' )
p->SetRight(
this);
116 if (this->GetLeft() !=
NULL)
117 n+= this->GetLeft()->CountMeAndAllDaughters();
118 if (this->GetRight() !=
NULL)
119 n+= this->GetRight()->CountMeAndAllDaughters();
148 std::stringstream s(
"");
153 this->AddAttributesToNode(node);
154 if (this->GetLeft()) this->GetLeft()->AddXMLTo(node);
155 if (this->GetRight()) this->GetRight()->AddXMLTo(node);
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)
winID h TVirtualViewer3D TVirtualGLPainter p
Node for the BinarySearch or Decision Trees.
static Int_t fgCount
counter of all nodes present.. for debug.. to spot memory leaks...
virtual void Print(std::ostream &os) const =0
char fPos
position, i.e. it is a left (l) or right (r) daughter
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 ~Node()
node destructor
void ReadXML(void *node, UInt_t tmva_Version_Code=262657)
read attributes from XML
std::ostream & operator<<(std::ostream &os, const BinaryTree &tree)