![]() |
ROOT
6.06/08
Reference Guide
|
Definition at line 71 of file BinarySearchTree.h.
Public Member Functions | |
| BinarySearchTree (void) | |
| default constructor More... | |
| BinarySearchTree (const BinarySearchTree &b) | |
| copy constructor that creates a true copy, i.e. a completely independent tree More... | |
| virtual | ~BinarySearchTree (void) |
| destructor More... | |
| virtual Node * | CreateNode (UInt_t) const |
| virtual BinaryTree * | CreateTree () const |
| virtual const char * | ClassName () const |
| BinarySearchTreeNode * | Search (Event *event) const |
| search the tree to find the node matching "event" More... | |
| void | Insert (const Event *) |
| insert a new "event" in the binary tree More... | |
| Double_t | GetSumOfWeights (void) const |
| return the sum of event (node) weights More... | |
| Double_t | GetSumOfWeights (Int_t theType) const |
| return the sum of event (node) weights More... | |
| void | SetPeriode (Int_t p) |
| UInt_t | GetPeriode (void) const |
| Double_t | SearchVolume (Volume *, std::vector< const TMVA::BinarySearchTreeNode *> *events=0) |
| search the whole tree and add up all weigths of events that lie within the given voluem More... | |
| Double_t | Fill (const std::vector< TMVA::Event *> &events, const std::vector< Int_t > &theVars, Int_t theType=-1) |
| create the search tree from the event collection using ONLY the variables specified in "theVars" More... | |
| Double_t | Fill (const std::vector< TMVA::Event *> &events, Int_t theType=-1) |
| create the search tree from the events in a TTree using ALL the variables specified included in the Event More... | |
| void | NormalizeTree () |
| Normalisation of tree. More... | |
| void | CalcStatistics (TMVA::Node *n=0) |
| calculate basic statistics (mean, rms for each variable) More... | |
| void | Clear (TMVA::Node *n=0) |
| clear nodes More... | |
| Float_t | Mean (Types::ESBType sb, UInt_t var) |
| Float_t | RMS (Types::ESBType sb, UInt_t var) |
| Float_t | Min (Types::ESBType sb, UInt_t var) |
| Float_t | Max (Types::ESBType sb, UInt_t var) |
| Int_t | SearchVolumeWithMaxLimit (TMVA::Volume *, std::vector< const TMVA::BinarySearchTreeNode *> *events=0, Int_t=-1) |
| Float_t | RMS (UInt_t var) |
| void | SetNormalize (Bool_t norm) |
Public Member Functions inherited from TMVA::BinaryTree | |
| BinaryTree (void) | |
| constructor for a yet "empty" tree. Needs to be filled afterwards More... | |
| virtual | ~BinaryTree () |
| destructor (deletes the nodes and "events" if owned by the tree More... | |
| void | SetRoot (Node *r) |
| virtual Node * | GetRoot () const |
| UInt_t | GetNNodes () const |
| UInt_t | CountNodes (Node *n=NULL) |
| return the number of nodes in the tree. (make a new count –> takes time) More... | |
| UInt_t | GetTotalTreeDepth () const |
| void | SetTotalTreeDepth (Int_t depth) |
| void | SetTotalTreeDepth (Node *n=NULL) |
| descend a tree to find all its leaf nodes, fill max depth reached in the tree at the same time. More... | |
| Node * | GetLeftDaughter (Node *n) |
| get left daughter node current node "n" More... | |
| Node * | GetRightDaughter (Node *n) |
| get right daughter node current node "n" More... | |
| virtual void | Print (std::ostream &os) const |
| recursively print the tree More... | |
| virtual void | Read (std::istream &istr, UInt_t tmva_Version_Code=TMVA_VERSION_CODE) |
| Read the binary tree from an input stream. More... | |
| virtual void * | AddXMLTo (void *parent) const |
| add attributes to XML More... | |
| virtual void | ReadXML (void *node, UInt_t tmva_Version_Code=TMVA_VERSION_CODE) |
| read attributes from XML More... | |
Static Public Member Functions | |
| static BinarySearchTree * | CreateFromXML (void *node, UInt_t tmva_Version_Code=TMVA_VERSION_CODE) |
| re-create a new tree (decision tree or search tree) from XML More... | |
Private Member Functions | |
| void | Insert (const Event *, Node *) |
| private internal function to insert a event (node) at the proper position More... | |
| BinarySearchTreeNode * | Search (Event *, Node *) const |
| Private, recursive, function for searching. More... | |
| Bool_t | InVolume (const std::vector< Float_t > &, Volume *) const |
| void | DestroyNode (BinarySearchTreeNode *) |
| void | NormalizeTree (std::vector< std::pair< Double_t, const TMVA::Event * > >::iterator, std::vector< std::pair< Double_t, const TMVA::Event * > >::iterator, UInt_t) |
| Double_t | SearchVolume (Node *, Volume *, Int_t, std::vector< const TMVA::BinarySearchTreeNode *> *events) |
| recursively walk through the daughter nodes and add up all weigths of events that lie within the given volume More... | |
Private Attributes | |
| UInt_t | fPeriod |
| UInt_t | fCurrentDepth |
| Bool_t | fStatisticsIsValid |
| std::vector< Float_t > | fMeans [2] |
| std::vector< Float_t > | fRMS [2] |
| std::vector< Float_t > | fMin [2] |
| std::vector< Float_t > | fMax [2] |
| std::vector< Double_t > | fSum [2] |
| std::vector< Double_t > | fSumSq [2] |
| Double_t | fNEventsW [2] |
| Double_t | fSumOfWeights |
| Bool_t | fCanNormalize |
| std::vector< std::pair< Double_t, const TMVA::Event * > > | fNormalizeTreeTable |
Additional Inherited Members | |
Protected Member Functions inherited from TMVA::BinaryTree | |
| void | DeleteNode (Node *) |
| protected, recursive, function used by the class destructor and when Pruning More... | |
| MsgLogger & | Log () const |
Protected Attributes inherited from TMVA::BinaryTree | |
| Node * | fRoot |
| UInt_t | fNNodes |
| UInt_t | fDepth |
#include <TMVA/BinarySearchTree.h>
Inheritance diagram for TMVA::BinarySearchTree:
Collaboration diagram for TMVA::BinarySearchTree:| TMVA::BinarySearchTree::BinarySearchTree | ( | void | ) |
default constructor
Definition at line 79 of file BinarySearchTree.cxx.
Referenced by CreateFromXML(), and CreateTree().
| TMVA::BinarySearchTree::BinarySearchTree | ( | const BinarySearchTree & | b | ) |
copy constructor that creates a true copy, i.e. a completely independent tree
Definition at line 93 of file BinarySearchTree.cxx.
|
virtual |
destructor
Definition at line 108 of file BinarySearchTree.cxx.
| void TMVA::BinarySearchTree::CalcStatistics | ( | TMVA::Node * | n = 0 | ) |
calculate basic statistics (mean, rms for each variable)
Definition at line 445 of file BinarySearchTree.cxx.
Referenced by TMVA::MethodPDERS::CalcAverages(), Fill(), GetPeriode(), and TMVA::MethodPDERS::ReadWeightsFromXML().
|
inlinevirtual |
Implements TMVA::BinaryTree.
Definition at line 87 of file BinarySearchTree.h.
| void TMVA::BinarySearchTree::Clear | ( | TMVA::Node * | n = 0 | ) |
clear nodes
Definition at line 371 of file BinarySearchTree.cxx.
Referenced by GetPeriode(), and NormalizeTree().
|
static |
re-create a new tree (decision tree or search tree) from XML
Definition at line 119 of file BinarySearchTree.cxx.
Referenced by CreateTree(), and TMVA::MethodPDERS::ReadWeightsFromXML().
Implements TMVA::BinaryTree.
Definition at line 84 of file BinarySearchTree.h.
|
inlinevirtual |
Implements TMVA::BinaryTree.
Definition at line 85 of file BinarySearchTree.h.
|
private |
Referenced by SetNormalize().
| Double_t TMVA::BinarySearchTree::Fill | ( | const std::vector< TMVA::Event *> & | events, |
| const std::vector< Int_t > & | theVars, | ||
| Int_t | theType = -1 |
||
| ) |
create the search tree from the event collection using ONLY the variables specified in "theVars"
Definition at line 265 of file BinarySearchTree.cxx.
Referenced by TMVA::MethodPDERS::CreateBinarySearchTree(), TMVA::MethodCuts::GetEfficiency(), GetPeriode(), TMVA::MethodCuts::GetTrainingEfficiency(), and TMVA::MethodCuts::Train().
| Double_t TMVA::BinarySearchTree::Fill | ( | const std::vector< TMVA::Event *> & | events, |
| Int_t | theType = -1 |
||
| ) |
create the search tree from the events in a TTree using ALL the variables specified included in the Event
Definition at line 276 of file BinarySearchTree.cxx.
Definition at line 106 of file BinarySearchTree.h.
Referenced by Insert(), SearchVolume(), and SearchVolumeWithMaxLimit().
return the sum of event (node) weights
Definition at line 234 of file BinarySearchTree.cxx.
Referenced by ClassName(), TMVA::MethodPDERS::CreateBinarySearchTree(), TMVA::MethodCuts::GetEffsfromSelection(), and TMVA::MethodPDERS::ReadWeightsFromXML().
return the sum of event (node) weights
Definition at line 249 of file BinarySearchTree.cxx.
insert a new "event" in the binary tree
Definition at line 130 of file BinarySearchTree.cxx.
Referenced by ClassName(), Fill(), TMVA::PDEFoamDensityBase::FillBinarySearchTree(), Insert(), and SetNormalize().
private internal function to insert a event (node) at the proper position
Definition at line 163 of file BinarySearchTree.cxx.
|
private |
Definition at line 429 of file BinarySearchTree.cxx.
Referenced by SearchVolume(), SearchVolumeWithMaxLimit(), and SetNormalize().
|
inline |
Definition at line 134 of file BinarySearchTree.h.
Referenced by TMVA::MethodCuts::Train().
|
inline |
Definition at line 125 of file BinarySearchTree.h.
Referenced by TMVA::MethodCuts::Train().
|
inline |
Definition at line 131 of file BinarySearchTree.h.
Referenced by TMVA::MethodCuts::Train().
| void TMVA::BinarySearchTree::NormalizeTree | ( | ) |
Normalisation of tree.
Definition at line 360 of file BinarySearchTree.cxx.
Referenced by TMVA::MethodPDERS::CreateBinarySearchTree(), Fill(), GetPeriode(), and SetNormalize().
|
private |
|
inline |
Definition at line 128 of file BinarySearchTree.h.
Referenced by TMVA::MethodPDERS::CalcAverages(), and TMVA::MethodCuts::Train().
Definition at line 139 of file BinarySearchTree.h.
| TMVA::BinarySearchTreeNode * TMVA::BinarySearchTree::Search | ( | Event * | event | ) | const |
search the tree to find the node matching "event"
Definition at line 209 of file BinarySearchTree.cxx.
Referenced by ClassName(), Search(), and SetNormalize().
|
private |
Private, recursive, function for searching.
Definition at line 217 of file BinarySearchTree.cxx.
| Double_t TMVA::BinarySearchTree::SearchVolume | ( | Volume * | volume, |
| std::vector< const TMVA::BinarySearchTreeNode *> * | events = 0 |
||
| ) |
search the whole tree and add up all weigths of events that lie within the given voluem
Definition at line 387 of file BinarySearchTree.cxx.
Referenced by TMVA::PDEFoamEventDensity::Density(), TMVA::PDEFoamTargetDensity::Density(), TMVA::PDEFoamDiscriminantDensity::Density(), TMVA::PDEFoamDecisionTreeDensity::FillHistograms(), TMVA::MethodCuts::GetEffsfromSelection(), GetPeriode(), TMVA::MethodPDERS::GetSample(), TMVA::MethodPDERS::GetVolumeContentForRoot(), SearchVolume(), and SetNormalize().
|
private |
recursively walk through the daughter nodes and add up all weigths of events that lie within the given volume
Definition at line 397 of file BinarySearchTree.cxx.
| Int_t TMVA::BinarySearchTree::SearchVolumeWithMaxLimit | ( | TMVA::Volume * | volume, |
| std::vector< const TMVA::BinarySearchTreeNode *> * | events = 0, |
||
| Int_t | max_points = -1 |
||
| ) |
Definition at line 506 of file BinarySearchTree.cxx.
Referenced by TMVA::MethodPDERS::GetSample(), and Max().
Definition at line 141 of file BinarySearchTree.h.
Referenced by TMVA::MethodPDERS::CreateBinarySearchTree(), and NormalizeTree().
Definition at line 103 of file BinarySearchTree.h.
Referenced by Insert(), TMVA::PDEFoamDensityBase::PDEFoamDensityBase(), TMVA::MethodPDERS::ReadWeightsFromStream(), and TMVA::MethodPDERS::ReadWeightsFromXML().
|
private |
Definition at line 176 of file BinarySearchTree.h.
Referenced by Insert(), and SetNormalize().
|
private |
Definition at line 163 of file BinarySearchTree.h.
Referenced by Insert().
|
private |
Definition at line 169 of file BinarySearchTree.h.
Referenced by CalcStatistics(), and Max().
|
private |
Definition at line 166 of file BinarySearchTree.h.
Referenced by CalcStatistics(), and Mean().
|
private |
Definition at line 168 of file BinarySearchTree.h.
Referenced by CalcStatistics(), and Min().
|
private |
Definition at line 172 of file BinarySearchTree.h.
Referenced by BinarySearchTree(), CalcStatistics(), and GetSumOfWeights().
|
private |
Definition at line 177 of file BinarySearchTree.h.
Referenced by Insert(), NormalizeTree(), and ~BinarySearchTree().
|
private |
Definition at line 162 of file BinarySearchTree.h.
Referenced by CalcStatistics(), Fill(), GetPeriode(), InVolume(), and SetPeriode().
|
private |
Definition at line 167 of file BinarySearchTree.h.
Referenced by CalcStatistics(), and RMS().
|
private |
Definition at line 164 of file BinarySearchTree.h.
Referenced by CalcStatistics(), and Insert().
|
private |
Definition at line 170 of file BinarySearchTree.h.
Referenced by CalcStatistics().
|
private |
Definition at line 173 of file BinarySearchTree.h.
Referenced by CalcStatistics(), Fill(), GetSumOfWeights(), and Insert().
|
private |
Definition at line 171 of file BinarySearchTree.h.
Referenced by CalcStatistics().