#include <BinaryTree.h>
Inheritance diagram for TMVA::BinaryTree:
Public Member Functions | |
BinaryTree (void) | |
virtual | ~BinaryTree () |
virtual Node * | CreateNode (UInt_t size=0) const =0 |
virtual BinaryTree * | CreateTree () const=0 |
virtual const char * | ClassName () const=0 |
void | SetRoot (Node *r) |
virtual Node * | GetRoot () const |
UInt_t | GetNNodes () const |
UInt_t | CountNodes (Node *n=NULL) |
UInt_t | GetTotalTreeDepth () const |
void | SetTotalTreeDepth (Int_t depth) |
void | SetTotalTreeDepth (Node *n=NULL) |
Node * | GetLeftDaughter (Node *n) |
Node * | GetRightDaughter (Node *n) |
virtual void | Print (ostream &os) const |
virtual void | Read (istream &istr, UInt_t tmva_Version_Code=TMVA_VERSION_CODE) |
virtual void * | AddXMLTo (void *parent) const |
virtual void | ReadXML (void *node, UInt_t tmva_Version_Code=TMVA_VERSION_CODE) |
BinaryTree (void) | |
virtual | ~BinaryTree () |
virtual Node * | CreateNode (UInt_t size=0) const =0 |
virtual BinaryTree * | CreateTree () const=0 |
virtual const char * | ClassName () const=0 |
void | SetRoot (Node *r) |
virtual Node * | GetRoot () const |
UInt_t | GetNNodes () const |
UInt_t | CountNodes (Node *n=NULL) |
UInt_t | GetTotalTreeDepth () const |
void | SetTotalTreeDepth (Int_t depth) |
void | SetTotalTreeDepth (Node *n=NULL) |
Node * | GetLeftDaughter (Node *n) |
Node * | GetRightDaughter (Node *n) |
virtual void | Print (ostream &os) const |
virtual void | Read (istream &istr, UInt_t tmva_Version_Code=TMVA_VERSION_CODE) |
virtual void * | AddXMLTo (void *parent) const |
virtual void | ReadXML (void *node, UInt_t tmva_Version_Code=TMVA_VERSION_CODE) |
Protected Member Functions | |
void | DeleteNode (Node *) |
MsgLogger & | Log () const |
void | DeleteNode (Node *) |
MsgLogger & | Log () const |
Protected Attributes | |
Node * | fRoot |
UInt_t | fNNodes |
UInt_t | fDepth |
Node * | fRoot |
Static Protected Attributes | |
static MsgLogger * | fgLogger |
static MsgLogger * | fgLogger |
Friends | |
ostream & | operator<< (ostream &os, const BinaryTree &tree) |
istream & | operator>> (istream &istr, BinaryTree &tree) |
ostream & | operator<< (ostream &os, const BinaryTree &tree) |
istream & | operator>> (istream &istr, BinaryTree &tree) |
Definition at line 66 of file BinaryTree.h.
TMVA::BinaryTree::BinaryTree | ( | void | ) |
TMVA::BinaryTree::~BinaryTree | ( | ) | [virtual] |
TMVA::BinaryTree::BinaryTree | ( | void | ) |
virtual TMVA::BinaryTree::~BinaryTree | ( | ) | [virtual] |
virtual BinaryTree* TMVA::BinaryTree::CreateTree | ( | ) | const [pure virtual] |
virtual const char* TMVA::BinaryTree::ClassName | ( | ) | const [pure virtual] |
Referenced by AddXMLTo().
void TMVA::BinaryTree::SetRoot | ( | Node * | r | ) | [inline] |
Definition at line 84 of file BinaryTree.h.
References fRoot.
Referenced by TMVA::DecisionTree::DecisionTree(), TMVA::BinarySearchTree::NormalizeTree(), and Read().
virtual Node* TMVA::BinaryTree::GetRoot | ( | ) | const [inline, virtual] |
Definition at line 87 of file BinaryTree.h.
References fRoot.
Referenced by AddXMLTo(), TMVA::BinarySearchTree::Insert(), Print(), and Read().
UInt_t TMVA::BinaryTree::GetNNodes | ( | ) | const [inline] |
Definition at line 90 of file BinaryTree.h.
References fNNodes.
Referenced by TMVA::RuleFit::ForestStatistics(), TMVA::RuleFit::MakeForest(), and TMVA::MethodDT::MonitorBoost().
Definition at line 95 of file BinaryTree.cxx.
References n.
Referenced by TMVA::DecisionTree::CleanTree(), TMVA::DecisionTree::PruneNode(), and TMVA::MethodPDERS::ReadWeightsFromXML().
UInt_t TMVA::BinaryTree::GetTotalTreeDepth | ( | ) | const [inline] |
Definition at line 97 of file BinaryTree.h.
References fDepth.
Referenced by TMVA::DecisionTree::SetParentTreeInNodes(), and SetTotalTreeDepth().
void TMVA::BinaryTree::SetTotalTreeDepth | ( | Int_t | depth | ) | [inline] |
void TMVA::BinaryTree::SetTotalTreeDepth | ( | Node * | n = NULL |
) |
Definition at line 201 of file BinaryTree.cxx.
References Endl, GetTotalTreeDepth(), TMVA::kFATAL, Log(), and n.
TMVA::Node * TMVA::BinaryTree::GetLeftDaughter | ( | Node * | n | ) |
Definition at line 81 of file BinaryTree.cxx.
References n.
Referenced by TMVA::DecisionTree::GetNode().
TMVA::Node * TMVA::BinaryTree::GetRightDaughter | ( | Node * | n | ) |
void TMVA::BinaryTree::Print | ( | ostream & | os | ) | const [virtual] |
Definition at line 117 of file BinaryTree.cxx.
References GetRoot(), and TMVA::Node::PrintRec().
Referenced by TMVA::operator<<().
void TMVA::BinaryTree::Read | ( | istream & | istr, | |
UInt_t | tmva_Version_Code = TMVA_VERSION_CODE | |||
) | [virtual] |
Definition at line 157 of file BinaryTree.cxx.
References CreateNode(), TMVA::Node::GetDepth(), TMVA::Node::GetParent(), TMVA::Node::GetPos(), GetRoot(), TMVA::Node::ReadDataRecord(), TMVA::Node::SetLeft(), TMVA::Node::SetParent(), TMVA::Node::SetRight(), SetRoot(), and SetTotalTreeDepth().
Referenced by TMVA::operator>>(), and TMVA::MethodDT::ReadWeightsFromStream().
void * TMVA::BinaryTree::AddXMLTo | ( | void * | parent | ) | const [virtual] |
Definition at line 125 of file BinaryTree.cxx.
References TMVA::Tools::AddAttr(), TMVA::Tools::AddChild(), TMVA::Node::AddXMLTo(), ClassName(), GetRoot(), and TMVA::gTools().
Referenced by TMVA::MethodDT::AddWeightsXMLTo(), and TMVA::MethodPDERS::AddWeightsXMLTo().
void TMVA::BinaryTree::ReadXML | ( | void * | node, | |
UInt_t | tmva_Version_Code = TMVA_VERSION_CODE | |||
) | [virtual] |
Definition at line 135 of file BinaryTree.cxx.
References CreateNode(), DeleteNode(), fRoot, TMVA::Tools::GetChild(), TMVA::gTools(), TMVA::Node::ReadXML(), and SetTotalTreeDepth().
Referenced by TMVA::BinarySearchTree::CreateFromXML(), TMVA::DecisionTree::CreateFromXML(), and TMVA::MethodDT::ReadWeightsFromXML().
void TMVA::BinaryTree::DeleteNode | ( | Node * | ) | [protected] |
Definition at line 69 of file BinaryTree.cxx.
References TMVA::Node::GetLeft(), and TMVA::Node::GetRight().
Referenced by TMVA::DecisionTree::PruneNode(), ReadXML(), and ~BinaryTree().
MsgLogger& TMVA::BinaryTree::Log | ( | ) | const [inline, protected] |
Definition at line 125 of file BinaryTree.h.
References fgLogger.
Referenced by TMVA::BinarySearchTree::BinarySearchTree(), TMVA::DecisionTree::CheckEvent(), TMVA::DecisionTree::CheckEventWithPrunedTree(), TMVA::DecisionTree::CountLeafNodes(), TMVA::DecisionTree::DecisionTree(), TMVA::DecisionTree::DescendTree(), TMVA::DecisionTree::GetFisherCoefficients(), TMVA::BinarySearchTree::GetSumOfWeights(), TMVA::DecisionTree::GetVariableImportance(), TMVA::BinarySearchTree::Insert(), TMVA::DecisionTree::SetParentTreeInNodes(), SetTotalTreeDepth(), and TMVA::DecisionTree::TestPrunedTreeQuality().
virtual BinaryTree* TMVA::BinaryTree::CreateTree | ( | ) | const [pure virtual] |
virtual const char* TMVA::BinaryTree::ClassName | ( | ) | const [pure virtual] |
void TMVA::BinaryTree::SetRoot | ( | Node * | r | ) | [inline] |
virtual Node* TMVA::BinaryTree::GetRoot | ( | ) | const [inline, virtual] |
UInt_t TMVA::BinaryTree::GetNNodes | ( | ) | const [inline] |
UInt_t TMVA::BinaryTree::GetTotalTreeDepth | ( | ) | const [inline] |
void TMVA::BinaryTree::SetTotalTreeDepth | ( | Int_t | depth | ) | [inline] |
void TMVA::BinaryTree::SetTotalTreeDepth | ( | Node * | n = NULL |
) |
virtual void TMVA::BinaryTree::Print | ( | ostream & | os | ) | const [virtual] |
virtual void TMVA::BinaryTree::Read | ( | istream & | istr, | |
UInt_t | tmva_Version_Code = TMVA_VERSION_CODE | |||
) | [virtual] |
virtual void* TMVA::BinaryTree::AddXMLTo | ( | void * | parent | ) | const [virtual] |
virtual void TMVA::BinaryTree::ReadXML | ( | void * | node, | |
UInt_t | tmva_Version_Code = TMVA_VERSION_CODE | |||
) | [virtual] |
void TMVA::BinaryTree::DeleteNode | ( | Node * | ) | [protected] |
MsgLogger& TMVA::BinaryTree::Log | ( | ) | const [inline, protected] |
ostream& operator<< | ( | ostream & | os, | |
const BinaryTree & | tree | |||
) | [friend] |
Definition at line 149 of file BinaryTree.cxx.
istream& operator>> | ( | istream & | istr, | |
TMVA::BinaryTree & | tree | |||
) | [friend] |
Definition at line 194 of file BinaryTree.cxx.
ostream& operator<< | ( | ostream & | os, | |
const BinaryTree & | tree | |||
) | [friend] |
Definition at line 149 of file BinaryTree.cxx.
istream& operator>> | ( | istream & | istr, | |
TMVA::BinaryTree & | tree | |||
) | [friend] |
Definition at line 194 of file BinaryTree.cxx.
Node* TMVA::BinaryTree::fRoot [protected] |
Definition at line 114 of file BinaryTree.h.
Referenced by TMVA::DecisionTree::GetRoot(), GetRoot(), ReadXML(), SetRoot(), and ~BinaryTree().
UInt_t TMVA::BinaryTree::fNNodes [protected] |
Definition at line 121 of file BinaryTree.h.
Referenced by TMVA::DecisionTree::DecisionTree(), GetNNodes(), and TMVA::BinarySearchTree::Insert().
UInt_t TMVA::BinaryTree::fDepth [protected] |
Definition at line 122 of file BinaryTree.h.
Referenced by GetTotalTreeDepth(), and SetTotalTreeDepth().
MsgLogger* TMVA::BinaryTree::fgLogger [static, protected] |
Node* TMVA::BinaryTree::fRoot [protected] |
Definition at line 114 of file BinaryTree.h.
MsgLogger* TMVA::BinaryTree::fgLogger [static, protected] |
Definition at line 124 of file BinaryTree.h.