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.
Public Member Functions | |
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 | |
Node (Node *p, char pos) | |
constructor of a daughter node as a daughter of 'p' | |
virtual | ~Node () |
node destructor | |
virtual void | AddAttributesToNode (void *node) const =0 |
virtual void | AddContentToNode (std::stringstream &s) const =0 |
void * | AddXMLTo (void *parent) const |
add attributes to XML | |
Int_t | CountMeAndAllDaughters () const |
recursively go through the part of the tree below this node and count all daughters | |
virtual Node * | CreateNode () const =0 |
int | GetCount () |
returns the global number of instantiated nodes | |
UInt_t | GetDepth () const |
virtual Node * | GetLeft () const |
virtual Node * | GetParent () const |
virtual TMVA::BinaryTree * | GetParentTree () const |
char | GetPos () const |
virtual Node * | GetRight () const |
virtual Bool_t | GoesLeft (const Event &) const =0 |
virtual Bool_t | GoesRight (const Event &) const =0 |
virtual TClass * | IsA () const |
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=262657)=0 |
virtual void | ReadContent (std::stringstream &s)=0 |
virtual Bool_t | ReadDataRecord (std::istream &, UInt_t tmva_Version_Code=262657)=0 |
void | ReadXML (void *node, UInt_t tmva_Version_Code=262657) |
read attributes from XML | |
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) |
virtual void | Streamer (TBuffer &) |
void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
Static Public Member Functions | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
Protected Attributes | |
UInt_t | fDepth |
depth of the node within the tree (seen from root node) | |
Node * | fLeft |
pointers to the two "daughter" nodes | |
Node * | fParent |
the previous (parent) node | |
BinaryTree * | fParentTree |
pointer to the parent tree to which the Node belongs | |
char | fPos |
position, i.e. it is a left (l) or right (r) daughter | |
Node * | fRight |
pointers to the two "daughter" nodes | |
Static Private Attributes | |
static Int_t | fgCount = 0 |
counter of all nodes present.. for debug.. to spot memory leaks... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Node &node) |
std::ostream & | operator<< (std::ostream &os, const Node *node) |
#include <TMVA/Node.h>
TMVA::Node::Node | ( | Node * | p, |
char | pos | ||
) |
TMVA::Node::Node | ( | const Node & | n | ) |
|
pure virtual |
Implemented in TMVA::BinarySearchTreeNode, TMVA::CCTreeWrapper::CCTreeNode, and TMVA::DecisionTreeNode.
|
pure virtual |
Implemented in TMVA::BinarySearchTreeNode, TMVA::CCTreeWrapper::CCTreeNode, and TMVA::DecisionTreeNode.
void * TMVA::Node::AddXMLTo | ( | void * | parent | ) | const |
|
static |
|
inlinestaticconstexpr |
Int_t TMVA::Node::CountMeAndAllDaughters | ( | ) | const |
|
pure virtual |
Implemented in TMVA::BinarySearchTreeNode, TMVA::CCTreeWrapper::CCTreeNode, and TMVA::DecisionTreeNode.
|
inlinestatic |
int TMVA::Node::GetCount | ( | ) |
|
inlinevirtual |
Reimplemented in TMVA::DecisionTreeNode.
|
inlinevirtual |
Reimplemented in TMVA::DecisionTreeNode.
|
inlinevirtual |
|
inlinevirtual |
Reimplemented in TMVA::DecisionTreeNode.
Implemented in TMVA::BinarySearchTreeNode, TMVA::DecisionTreeNode, and TMVA::CCTreeWrapper::CCTreeNode.
Implemented in TMVA::BinarySearchTreeNode, TMVA::DecisionTreeNode, and TMVA::CCTreeWrapper::CCTreeNode.
|
inlinevirtual |
Reimplemented in TMVA::BinarySearchTreeNode, and TMVA::DecisionTreeNode.
|
pure virtual |
Implemented in TMVA::BinarySearchTreeNode, TMVA::CCTreeWrapper::CCTreeNode, and TMVA::DecisionTreeNode.
|
pure virtual |
Implemented in TMVA::BinarySearchTreeNode, TMVA::CCTreeWrapper::CCTreeNode, and TMVA::DecisionTreeNode.
|
pure virtual |
Implemented in TMVA::BinarySearchTreeNode, TMVA::CCTreeWrapper::CCTreeNode, and TMVA::DecisionTreeNode.
|
pure virtual |
Implemented in TMVA::BinarySearchTreeNode, TMVA::CCTreeWrapper::CCTreeNode, and TMVA::DecisionTreeNode.
|
pure virtual |
Implemented in TMVA::CCTreeWrapper::CCTreeNode, TMVA::BinarySearchTreeNode, and TMVA::DecisionTreeNode.
void TMVA::Node::ReadXML | ( | void * | node, |
UInt_t | tmva_Version_Code = 262657 |
||
) |
|
inlinevirtual |
Reimplemented in TMVA::DecisionTreeNode.
|
inlinevirtual |
Reimplemented in TMVA::DecisionTreeNode.
|
inlinevirtual |
|
inlinevirtual |
Reimplemented in TMVA::DecisionTreeNode.
|
virtual |
Reimplemented in TMVA::BinarySearchTreeNode, and TMVA::DecisionTreeNode.
|
inline |
|
friend |
|
friend |
|
protected |
|
staticprivate |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |