ROOT logo
ROOT » TMVA » TMVA::Node

class TMVA::Node


  Node for the BinarySearch or Decision Trees.

  For the binary search tree, it basically consists of the EVENT, and
  pointers to the parent and daughters

  In case of the Decision Tree, it specifies parent and daughters, as
  well as "which variable is used" in the selection of this node,
  including the respective cut value.


Function Members (Methods)

 
    This is an abstract class, constructors will not be documented.
    Look at the header to check for available constructors.

public:
virtual~Node()
virtual voidAddAttributesToNode(void* node) const
virtual voidAddContentToNode(stringstream& s) const
void*AddXMLTo(void* parent) const
static TClass*Class()
Int_tCountMeAndAllDaughters() const
virtual TMVA::Node*CreateNode() const
intGetCount()
UInt_tGetDepth() const
TMVA::Node*GetLeft() const
TMVA::Node*GetParent() const
TMVA::BinaryTree*GetParentTree() const
charGetPos() const
TMVA::Node*GetRight() const
virtual Bool_tGoesLeft(const TMVA::Event&) const
virtual Bool_tGoesRight(const TMVA::Event&) const
virtual TClass*IsA() const
TMVA::Node&operator=(const TMVA::Node&)
virtual voidPrint(ostream& os) const
virtual voidPrintRec(ostream& os) const
virtual voidReadAttributes(void* node, UInt_t tmva_Version_Code = TMVA_VERSION_CODE)
virtual voidReadContent(stringstream& s)
virtual Bool_tReadDataRecord(istream&, UInt_t tmva_Version_Code = TMVA_VERSION_CODE)
voidReadXML(void* node, UInt_t tmva_Version_Code = TMVA_VERSION_CODE)
voidSetDepth(UInt_t d)
voidSetLeft(TMVA::Node* l)
voidSetParent(TMVA::Node* p)
voidSetParentTree(TMVA::BinaryTree* t)
voidSetPos(char s)
voidSetRight(TMVA::Node* r)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)

Data Members

private:
UInt_tfDepthdepth of the node within the tree (seen from root node)
TMVA::Node*fLeftpointers to the two "daughter" nodes
TMVA::Node*fParentthe previous (parent) node
TMVA::BinaryTree*fParentTreepointer to the parent tree to which the Node belongs
charfPosposition, i.e. it is a left (l) or right (r) daughter
TMVA::Node*fRightpointers to the two "daughter" nodes
static Int_tfgCountcounter of all nodes present.. for debug.. to spot memory leaks...

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

~Node()
 node destructor
Int_t CountMeAndAllDaughters() const
recursively go through the part of the tree below this node and count all daughters
void* AddXMLTo(void* parent) const
 add attributes to XML
void ReadXML(void* node, UInt_t tmva_Version_Code = TMVA_VERSION_CODE)
 read attributes from XML
Node* CreateNode() const
Bool_t GoesRight(const TMVA::Event& ) const
 test event if i{ decends the tree at this node to the right
Bool_t GoesLeft(const TMVA::Event& ) const
 test event if it decends the tree at this node to the left
Node* GetLeft() const
 test event if it is equal to the event that "makes the node" (just for the "search tree"
 return pointer to the left daughter node
{ return fLeft; }
Node* GetRight() const
 return pointer to the right daughter node
{ return fRight; }
Node* GetParent() const
 return pointer to the parent node
{ return fParent; }
void SetLeft(TMVA::Node* l)
 set pointer to the left daughter node
{ fLeft = l;}
void SetRight(TMVA::Node* r)
 set pointer to the right daughter node
{ fRight = r;}
void SetParent(TMVA::Node* p)
 set pointer to the parent node
{ fParent = p;}
void Print(ostream& os) const
 printout of the node
void PrintRec(ostream& os) const
 recursive printout of the node and it daughters
void AddAttributesToNode(void* node) const
void AddContentToNode(stringstream& s) const
void SetDepth(UInt_t d)
 Set depth, layer of the where the node is within the tree, seen from the top (root)
{fDepth=d;}
UInt_t GetDepth() const
 Return depth, layer of the where the node is within the tree, seen from the top (root)
{return fDepth;}
void SetPos(char s)
 set node position, i.e, the node is a left (l) or right (r) daugther
{fPos=s;}
char GetPos() const
 Return the node position, i.e, the node is a left (l) or right (r) daugther
{return fPos;}
TMVA::BinaryTree* GetParentTree() const
 Return the pointer to the Parent tree to which the Node belongs
{return fParentTree;}
void SetParentTree(TMVA::BinaryTree* t)
 set the pointer to the Parent Tree to which the Node belongs
int GetCount()
{return fgCount;}
Bool_t ReadDataRecord(istream& , UInt_t tmva_Version_Code = TMVA_VERSION_CODE)
void ReadAttributes(void* node, UInt_t tmva_Version_Code = TMVA_VERSION_CODE)
void ReadContent(stringstream& s)