+
class TMVA::Node
-
library: libTMVA
#include "Node.h"
Display options:
Show inherited
Show non-public

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()
static TClass*Class()
Int_tCountMeAndAllDaughters() const
intGetCount()
UInt_tGetDepth() const
TMVA::Node*GetLeft() const
virtual Int_tGetMemSize() 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 voidReadRec(istream& is, char& pos, UInt_t& depth, TMVA::Node* parent = NULL)
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( void )
 node destructor
Int_t CountMeAndAllDaughters( void )
recursively go through the part of the tree below this node and count all daughters
Int_t GetMemSize()
 calculates the memory size of the node
Bool_t GoesRight(const TMVA::Event& ) const
 test event if i{ decends the tree at this node to the right
 test event if it decends the tree at this node to the left
Bool_t GoesLeft(const TMVA::Event& ) const
 test event if it is equal to the event that "makes the node" (just for the "search tree"
Node* GetLeft()
 return pointer to the left daughter node
 return pointer to the right daughter node
{ return fLeft; }
Node* GetRight()
 return pointer to the parent node
{ return fRight; }
Node* GetParent()
{ return fParent; }
void SetLeft(TMVA::Node* l)
 set pointer to the left daughter node
 set pointer to the right daughter node
{ fLeft = l;}
void SetRight(TMVA::Node* r)
 set pointer to the parent node
{ fRight = r;}
void SetParent(TMVA::Node* p)
{ fParent = p;}
void Print(ostream& os) const
 printout of the node
void PrintRec(ostream& os) const
 recursive printout of the node and it daughters
 recursive reading of the node (essectially the whole tree) from a text file
void ReadRec(istream& is, char& pos, UInt_t& depth, TMVA::Node* parent = NULL)
 Set depth, layer of the where the node is within the tree, seen from the top (root)
{fDepth=d;}
UInt_t GetDepth()
 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()
 Return the node position, i.e, the node is a left (l) or right (r) daugther
{return fPos;}
TMVA::BinaryTree* GetParentTree()
 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
{fParentTree = t;}
int GetCount()
{return fgCount;}

Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
Last update: root/tmva $Id: Node.cxx,v 1.14 2007/06/19 13:26:21 brun Exp $

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.