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 55 of file BinarySearchTreeNode.h.
Public Member Functions | |
| BinarySearchTreeNode (BinarySearchTreeNode *parent, char pos) | |
| constructor of a daughter node as a daughter of 'p' | |
| BinarySearchTreeNode (const BinarySearchTreeNode &n, BinarySearchTreeNode *parent=nullptr) | |
| copy constructor of a node. | |
| BinarySearchTreeNode (const Event *e=nullptr, UInt_t signalClass=0) | |
| constructor of a node for the search tree | |
| virtual | ~BinarySearchTreeNode () |
| node destructor | |
| void | AddAttributesToNode (void *node) const override |
| adding attributes to tree node | |
| void | AddContentToNode (std::stringstream &s) const override |
| adding attributes to tree node | |
| 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 | |
| Node * | CreateNode () const override |
| virtual Bool_t | EqualsMe (const Event &) const |
| check if the event fed into the node actually equals the event that forms the node (in case of a search tree) | |
| UInt_t | GetClass () const |
| int | GetCount () |
| returns the global number of instantiated nodes | |
| UInt_t | GetDepth () const |
| const std::vector< Float_t > & | GetEventV () const |
| virtual Node * | GetLeft () const |
| virtual Node * | GetParent () const |
| virtual TMVA::BinaryTree * | GetParentTree () const |
| char | GetPos () const |
| virtual Node * | GetRight () const |
| Short_t | GetSelector () const |
| return index of variable used for discrimination at this node | |
| const std::vector< Float_t > & | GetTargets () const |
| Float_t | GetWeight () const |
| Bool_t | GoesLeft (const Event &) const override |
| check if the event fed into the node goes/descends to the left daughter | |
| Bool_t | GoesRight (const Event &) const override |
| check if the event fed into the node goes/descends to the right daughter | |
| TClass * | IsA () const override |
| void | Print (std::ostream &os) const override |
| print the node | |
| void | PrintRec (std::ostream &os) const override |
| recursively print the node and its daughters (--> print the 'tree') | |
| void | ReadAttributes (void *node, UInt_t tmva_Version_Code=262657) override |
| read attributes from XML | |
| void | ReadContent (std::stringstream &s) override |
| read events from node | |
| Bool_t | ReadDataRecord (std::istream &is, UInt_t tmva_Version_Code=262657) override |
| Read the data block. | |
| 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) |
| void | SetSelector (Short_t i) |
| set index of variable used for discrimination at this node | |
| void | Streamer (TBuffer &) override |
| 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 | |
Private Attributes | |
| UInt_t | fClass |
| std::vector< Float_t > | fEventV |
| Short_t | fSelector |
| index of variable used in node selection (decision tree) | |
| std::vector< Float_t > | fTargets |
| Float_t | fWeight |
Static Private Attributes | |
| static Int_t | fgCount = 0 |
| counter of all nodes present.. for debug.. to spot memory leaks... | |
#include <TMVA/BinarySearchTreeNode.h>
| TMVA::BinarySearchTreeNode::BinarySearchTreeNode | ( | const Event * | e = nullptr, |
| UInt_t | signalClass = 0 ) |
constructor of a node for the search tree
Definition at line 58 of file BinarySearchTreeNode.cxx.
| TMVA::BinarySearchTreeNode::BinarySearchTreeNode | ( | BinarySearchTreeNode * | parent, |
| char | pos ) |
constructor of a daughter node as a daughter of 'p'
Definition at line 77 of file BinarySearchTreeNode.cxx.
| TMVA::BinarySearchTreeNode::BinarySearchTreeNode | ( | const BinarySearchTreeNode & | n, |
| BinarySearchTreeNode * | parent = nullptr ) |
copy constructor of a node.
It will result in an explicit copy of the node and recursively all it's daughters
Definition at line 91 of file BinarySearchTreeNode.cxx.
|
virtual |
node destructor
Definition at line 112 of file BinarySearchTreeNode.cxx.
|
overridevirtual |
adding attributes to tree node
Implements TMVA::Node.
Definition at line 244 of file BinarySearchTreeNode.cxx.
|
overridevirtual |
adding attributes to tree node
Implements TMVA::Node.
Definition at line 256 of file BinarySearchTreeNode.cxx.
|
inherited |
|
static |
|
static |
|
inlinestaticconstexpr |
Definition at line 118 of file BinarySearchTreeNode.h.
|
inherited |
|
inlineoverridevirtual |
Implements TMVA::Node.
Definition at line 72 of file BinarySearchTreeNode.h.
|
inlinestatic |
Definition at line 118 of file BinarySearchTreeNode.h.
check if the event fed into the node actually equals the event that forms the node (in case of a search tree)
Definition at line 138 of file BinarySearchTreeNode.cxx.
|
inline |
Definition at line 90 of file BinarySearchTreeNode.h.
|
inherited |
|
inline |
Definition at line 88 of file BinarySearchTreeNode.h.
|
inlinevirtualinherited |
Reimplemented in TMVA::DecisionTreeNode.
|
inlinevirtualinherited |
Reimplemented in TMVA::DecisionTreeNode.
|
inlinevirtualinherited |
|
inlinevirtualinherited |
Reimplemented in TMVA::DecisionTreeNode.
|
inline |
return index of variable used for discrimination at this node
Definition at line 86 of file BinarySearchTreeNode.h.
|
inline |
Definition at line 92 of file BinarySearchTreeNode.h.
|
inline |
Definition at line 89 of file BinarySearchTreeNode.h.
check if the event fed into the node goes/descends to the left daughter
Implements TMVA::Node.
Definition at line 128 of file BinarySearchTreeNode.cxx.
check if the event fed into the node goes/descends to the right daughter
Implements TMVA::Node.
Definition at line 119 of file BinarySearchTreeNode.cxx.
|
inlineoverridevirtual |
Reimplemented from TMVA::Node.
Definition at line 118 of file BinarySearchTreeNode.h.
|
overridevirtual |
|
overridevirtual |
recursively print the node and its daughters (--> print the 'tree')
Implements TMVA::Node.
Definition at line 171 of file BinarySearchTreeNode.cxx.
|
overridevirtual |
read attributes from XML
Implements TMVA::Node.
Definition at line 224 of file BinarySearchTreeNode.cxx.
|
overridevirtual |
read events from node
Implements TMVA::Node.
Definition at line 267 of file BinarySearchTreeNode.cxx.
|
overridevirtual |
Read the data block.
Implements TMVA::Node.
Definition at line 188 of file BinarySearchTreeNode.cxx.
|
inherited |
|
inlinevirtualinherited |
Reimplemented in TMVA::DecisionTreeNode.
|
inlinevirtualinherited |
Reimplemented in TMVA::DecisionTreeNode.
|
inlinevirtualinherited |
|
inlinevirtualinherited |
Reimplemented in TMVA::DecisionTreeNode.
|
inline |
set index of variable used for discrimination at this node
Definition at line 84 of file BinarySearchTreeNode.h.
|
overridevirtual |
Reimplemented from TMVA::Node.
|
inline |
Definition at line 118 of file BinarySearchTreeNode.h.
|
private |
Definition at line 114 of file BinarySearchTreeNode.h.
|
protectedinherited |
|
private |
Definition at line 110 of file BinarySearchTreeNode.h.
|
staticprivateinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
private |
index of variable used in node selection (decision tree)
Definition at line 116 of file BinarySearchTreeNode.h.
|
private |
Definition at line 111 of file BinarySearchTreeNode.h.
|
private |
Definition at line 113 of file BinarySearchTreeNode.h.