Logo ROOT   6.12/07
Reference Guide
List of all members | Public Member Functions | Protected Attributes | Static Private Attributes | Friends | List of all members
TMVA::Node Class Referenceabstract

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.

Definition at line 56 of file Node.h.

Public Member Functions

 Node ()
 
 Node (Node *p, char pos)
 constructor of a daughter node as a daughter of 'p' More...
 
 Node (const Node &n)
 copy constructor, make sure you don't just copy the pointer to the node, but that the parents/daughters are initialized to 0 (and set by the copy constructors of the derived classes More...
 
virtual ~Node ()
 node destructor More...
 
virtual void AddAttributesToNode (void *node) const =0
 
virtual void AddContentToNode (std::stringstream &s) const =0
 
voidAddXMLTo (void *parent) const
 add attributes to XML More...
 
Int_t CountMeAndAllDaughters () const
 recursively go through the part of the tree below this node and count all daughters More...
 
virtual NodeCreateNode () const =0
 
int GetCount ()
 returns the global number of instantiated nodes More...
 
UInt_t GetDepth () const
 
virtual NodeGetLeft () const
 
virtual NodeGetParent () const
 
virtual TMVA::BinaryTreeGetParentTree () const
 
char GetPos () const
 
virtual NodeGetRight () const
 
virtual Bool_t GoesLeft (const Event &) const =0
 
virtual Bool_t GoesRight (const Event &) const =0
 
virtual void Print (std::ostream &os) const =0
 
virtual void PrintRec (std::ostream &os) const =0
 
virtual void ReadAttributes (void *node, UInt_t tmva_Version_Code=TMVA_VERSION_CODE)=0
 
virtual void ReadContent (std::stringstream &s)=0
 
virtual Bool_t ReadDataRecord (std::istream &, UInt_t tmva_Version_Code=TMVA_VERSION_CODE)=0
 
void ReadXML (void *node, UInt_t tmva_Version_Code=TMVA_VERSION_CODE)
 read attributes from XML More...
 
void SetDepth (UInt_t d)
 
virtual void SetLeft (Node *l)
 
virtual void SetParent (Node *p)
 
virtual void SetParentTree (TMVA::BinaryTree *t)
 
void SetPos (char s)
 
virtual void SetRight (Node *r)
 

Protected Attributes

UInt_t fDepth
 
NodefLeft
 
NodefParent
 
BinaryTreefParentTree
 
char fPos
 
NodefRight
 

Static Private Attributes

static Int_t fgCount = 0
 

Friends

std::ostream & operator<< (std::ostream &os, const Node &node)
 
std::ostream & operator<< (std::ostream &os, const Node *node)
 

#include <TMVA/Node.h>

Inheritance diagram for TMVA::Node:
[legend]

Constructor & Destructor Documentation

◆ Node() [1/3]

TMVA::Node::Node ( )

Definition at line 51 of file Node.cxx.

◆ Node() [2/3]

TMVA::Node::Node ( Node p,
char  pos 
)

constructor of a daughter node as a daughter of 'p'

Definition at line 66 of file Node.cxx.

◆ Node() [3/3]

TMVA::Node::Node ( const Node n)

copy constructor, make sure you don't just copy the pointer to the node, but that the parents/daughters are initialized to 0 (and set by the copy constructors of the derived classes

Definition at line 84 of file Node.cxx.

◆ ~Node()

TMVA::Node::~Node ( )
virtual

node destructor

Definition at line 98 of file Node.cxx.

Member Function Documentation

◆ AddAttributesToNode()

virtual void TMVA::Node::AddAttributesToNode ( void node) const
pure virtual

◆ AddContentToNode()

virtual void TMVA::Node::AddContentToNode ( std::stringstream &  s) const
pure virtual

◆ AddXMLTo()

void * TMVA::Node::AddXMLTo ( void parent) const

add attributes to XML

Definition at line 147 of file Node.cxx.

◆ CountMeAndAllDaughters()

Int_t TMVA::Node::CountMeAndAllDaughters ( ) const

recursively go through the part of the tree below this node and count all daughters

Definition at line 114 of file Node.cxx.

◆ CreateNode()

virtual Node* TMVA::Node::CreateNode ( ) const
pure virtual

◆ GetCount()

int TMVA::Node::GetCount ( )

returns the global number of instantiated nodes

Definition at line 106 of file Node.cxx.

◆ GetDepth()

UInt_t TMVA::Node::GetDepth ( ) const
inline

Definition at line 114 of file Node.h.

◆ GetLeft()

virtual Node* TMVA::Node::GetLeft ( void  ) const
inlinevirtual

Reimplemented in TMVA::DecisionTreeNode.

Definition at line 87 of file Node.h.

◆ GetParent()

virtual Node* TMVA::Node::GetParent ( ) const
inlinevirtual

Reimplemented in TMVA::DecisionTreeNode.

Definition at line 89 of file Node.h.

◆ GetParentTree()

virtual TMVA::BinaryTree* TMVA::Node::GetParentTree ( ) const
inlinevirtual

Definition at line 123 of file Node.h.

◆ GetPos()

char TMVA::Node::GetPos ( ) const
inline

Definition at line 120 of file Node.h.

◆ GetRight()

virtual Node* TMVA::Node::GetRight ( void  ) const
inlinevirtual

Reimplemented in TMVA::DecisionTreeNode.

Definition at line 88 of file Node.h.

◆ GoesLeft()

virtual Bool_t TMVA::Node::GoesLeft ( const Event ) const
pure virtual

◆ GoesRight()

virtual Bool_t TMVA::Node::GoesRight ( const Event ) const
pure virtual

◆ Print()

virtual void TMVA::Node::Print ( std::ostream &  os) const
pure virtual

◆ PrintRec()

virtual void TMVA::Node::PrintRec ( std::ostream &  os) const
pure virtual

◆ ReadAttributes()

virtual void TMVA::Node::ReadAttributes ( void node,
UInt_t  tmva_Version_Code = TMVA_VERSION_CODE 
)
pure virtual

◆ ReadContent()

virtual void TMVA::Node::ReadContent ( std::stringstream &  s)
pure virtual

◆ ReadDataRecord()

virtual Bool_t TMVA::Node::ReadDataRecord ( std::istream &  ,
UInt_t  tmva_Version_Code = TMVA_VERSION_CODE 
)
pure virtual

◆ ReadXML()

void TMVA::Node::ReadXML ( void node,
UInt_t  tmva_Version_Code = TMVA_VERSION_CODE 
)

read attributes from XML

Definition at line 163 of file Node.cxx.

◆ SetDepth()

void TMVA::Node::SetDepth ( UInt_t  d)
inline

Definition at line 111 of file Node.h.

◆ SetLeft()

virtual void TMVA::Node::SetLeft ( Node l)
inlinevirtual

Reimplemented in TMVA::DecisionTreeNode.

Definition at line 92 of file Node.h.

◆ SetParent()

virtual void TMVA::Node::SetParent ( Node p)
inlinevirtual

Reimplemented in TMVA::DecisionTreeNode.

Definition at line 94 of file Node.h.

◆ SetParentTree()

virtual void TMVA::Node::SetParentTree ( TMVA::BinaryTree t)
inlinevirtual

Definition at line 126 of file Node.h.

◆ SetPos()

void TMVA::Node::SetPos ( char  s)
inline

Definition at line 117 of file Node.h.

◆ SetRight()

virtual void TMVA::Node::SetRight ( Node r)
inlinevirtual

Reimplemented in TMVA::DecisionTreeNode.

Definition at line 93 of file Node.h.

Friends And Related Function Documentation

◆ operator<< [1/2]

std::ostream& operator<< ( std::ostream &  os,
const Node node 
)
friend

◆ operator<< [2/2]

std::ostream& operator<< ( std::ostream &  os,
const Node node 
)
friend

Member Data Documentation

◆ fDepth

UInt_t TMVA::Node::fDepth
protected

Definition at line 141 of file Node.h.

◆ fgCount

Int_t TMVA::Node::fgCount = 0
staticprivate

Definition at line 146 of file Node.h.

◆ fLeft

Node* TMVA::Node::fLeft
protected

Definition at line 137 of file Node.h.

◆ fParent

Node* TMVA::Node::fParent
protected

Definition at line 136 of file Node.h.

◆ fParentTree

BinaryTree* TMVA::Node::fParentTree
protected

Definition at line 143 of file Node.h.

◆ fPos

char TMVA::Node::fPos
protected

Definition at line 140 of file Node.h.

◆ fRight

Node* TMVA::Node::fRight
protected

Definition at line 138 of file Node.h.

Libraries for TMVA::Node:
[legend]

The documentation for this class was generated from the following files: