TMVA::BinaryTree Class Reference

#include <BinaryTree.h>

Inheritance diagram for TMVA::BinaryTree:

TMVA::BinarySearchTree TMVA::BinarySearchTree TMVA::DecisionTree TMVA::DecisionTree List of all members.

Public Member Functions

 BinaryTree (void)
virtual ~BinaryTree ()
virtual NodeCreateNode (UInt_t size=0) const =0
virtual BinaryTreeCreateTree () const=0
virtual const char * ClassName () const=0
void SetRoot (Node *r)
virtual NodeGetRoot () 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)
NodeGetLeftDaughter (Node *n)
NodeGetRightDaughter (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 NodeCreateNode (UInt_t size=0) const =0
virtual BinaryTreeCreateTree () const=0
virtual const char * ClassName () const=0
void SetRoot (Node *r)
virtual NodeGetRoot () 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)
NodeGetLeftDaughter (Node *n)
NodeGetRightDaughter (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 *)
MsgLoggerLog () const
void DeleteNode (Node *)
MsgLoggerLog () const

Protected Attributes

NodefRoot
UInt_t fNNodes
UInt_t fDepth
NodefRoot

Static Protected Attributes

static MsgLoggerfgLogger
static MsgLoggerfgLogger

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)

Detailed Description

Definition at line 66 of file BinaryTree.h.


Constructor & Destructor Documentation

TMVA::BinaryTree::BinaryTree ( void   ) 

TMVA::BinaryTree::~BinaryTree (  )  [virtual]

Definition at line 61 of file BinaryTree.cxx.

References DeleteNode(), and fRoot.

TMVA::BinaryTree::BinaryTree ( void   ) 

virtual TMVA::BinaryTree::~BinaryTree (  )  [virtual]


Member Function Documentation

virtual Node* TMVA::BinaryTree::CreateNode ( UInt_t  size = 0  )  const [pure virtual]

Referenced by Read(), and ReadXML().

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().

UInt_t TMVA::BinaryTree::CountNodes ( Node n = NULL  ) 

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]

Definition at line 99 of file BinaryTree.h.

References fDepth.

Referenced by Read(), and ReadXML().

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  ) 

Definition at line 88 of file BinaryTree.cxx.

References 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 Node* TMVA::BinaryTree::CreateNode ( UInt_t  size = 0  )  const [pure virtual]

virtual BinaryTree* TMVA::BinaryTree::CreateTree (  )  const [pure virtual]

virtual const char* TMVA::BinaryTree::ClassName (  )  const [pure virtual]

void TMVA::BinaryTree::SetRoot ( Node r  )  [inline]

Definition at line 84 of file BinaryTree.h.

References fRoot.

virtual Node* TMVA::BinaryTree::GetRoot (  )  const [inline, virtual]

Definition at line 87 of file BinaryTree.h.

References fRoot.

UInt_t TMVA::BinaryTree::GetNNodes (  )  const [inline]

Definition at line 90 of file BinaryTree.h.

References fNNodes.

UInt_t TMVA::BinaryTree::CountNodes ( Node n = NULL  ) 

UInt_t TMVA::BinaryTree::GetTotalTreeDepth (  )  const [inline]

Definition at line 97 of file BinaryTree.h.

References fDepth.

void TMVA::BinaryTree::SetTotalTreeDepth ( Int_t  depth  )  [inline]

Definition at line 99 of file BinaryTree.h.

References fDepth.

void TMVA::BinaryTree::SetTotalTreeDepth ( Node n = NULL  ) 

Node* TMVA::BinaryTree::GetLeftDaughter ( Node n  ) 

Node* TMVA::BinaryTree::GetRightDaughter ( Node n  ) 

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]

Definition at line 125 of file BinaryTree.h.

References fgLogger.


Friends And Related Function Documentation

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.


Member Data Documentation

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]

Definition at line 124 of file BinaryTree.h.

Referenced by Log().

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.


The documentation for this class was generated from the following files:
Generated on Tue Jul 5 17:01:05 2011 for ROOT_528-00b_version by  doxygen 1.5.1