library: libTMVA
#include "BinarySearchTree.h"

TMVA::BinarySearchTree


class description - header file - source file
viewCVS header - viewCVS source

class TMVA::BinarySearchTree: public TMVA::BinaryTree

Inheritance Inherited Members Includes Libraries
Class Charts

Function Members (Methods)

Display options:
Show inherited
Show non-public
public:
virtual~BinarySearchTree()
TMVA::BinarySearchTreeBinarySearchTree()
TMVA::BinarySearchTreeBinarySearchTree(const TMVA::BinarySearchTree& b)
TMVA::BinaryTreeTMVA::BinaryTree::BinaryTree()
static TClass*Class()
UInt_tTMVA::BinaryTree::CountNodes(TMVA::Node* n = NULL)
Int_tFill(vector<TMVA::Event*> theTree, Int_t theType = -1)
Int_tFill(vector<TMVA::Event*>, vector<Int_t> theVars, Int_t theType = -1)
Int_tFill(const TMVA::DataSet& ds, TTree* theTree, Int_t theType = -1, TMVA::Types::EPreprocessingMethod corr = Types::kNone, TMVA::Types::ESBType type = Types::kSignal)
TMVA::Node*TMVA::BinaryTree::GetLeftDaughter(TMVA::Node* n)
UInt_tTMVA::BinaryTree::GetNNodes() const
UInt_tGetPeriode() const
TMVA::Node*TMVA::BinaryTree::GetRightDaughter(TMVA::Node* n)
TMVA::Node*TMVA::BinaryTree::GetRoot() const
Double_tGetSumOfWeights() const
voidInsert(TMVA::Event*, Bool_t eventOwnership = kFALSE)
virtual TClass*IsA() const
voidTMVA::BinaryTree::Print(ostream& os) const
TMVA::BinarySearchTreeNode*Search(TMVA::Event* event) const
Double_tSearchVolume(TMVA::Volume*, vector<TMVA::Event*>* events = 0)
voidSetPeriode(Int_t p)
voidTMVA::BinaryTree::SetRoot(TMVA::Node* r)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
protected:
voidTMVA::BinaryTree::DeleteNode(TMVA::Node*)
private:
voidDestroyNode(TMVA::BinarySearchTreeNode*)
voidInsert(TMVA::Event*, TMVA::Node*, Bool_t eventOwnership = kFALSE)
Bool_tInVolume(TMVA::Event*, TMVA::Volume*) const
TMVA::BinarySearchTreeNode*Search(TMVA::Event*, TMVA::Node*) const
Double_tSearchVolume(TMVA::Node*, TMVA::Volume*, Int_t, vector<TMVA::Event*,allocator<TMVA::Event*> >* events)

Data Members

protected:
Int_tTMVA::BinaryTree::fNNodestotal number of nodes in the tree (counted)
TMVA::MsgLoggerTMVA::BinaryTree::fLoggermessage loggera
private:
Double_tfSumOfWeightssum of the events (node) weights
UInt_tfPeriodeperiode (number of event variables)
UInt_tfCurrentDepthinternal variable, counting the depth of the tree during insertion

Class Description

                                                                      
 a simple Binary search tree including volume search method                    
                                                                      
_______________________________________________________________________
BinarySearchTree( void )
 default constructor
BinarySearchTree( const BinarySearchTree &b)
 copy constructor that creates a true copy, i.e. a completely independent tree 
~BinarySearchTree( void )
 destructor
void Insert( TMVA::Event* event, Bool_t eventOwnership )
insert a new "event" in the binary tree
   set "eventOwnershipt" to kTRUE if the event should be owned (deleted) by
   the tree
void Insert( TMVA::Event *event, TMVA::Node *node, Bool_t eventOwnership )
private internal fuction to insert a event (node) at the proper position
TMVA::BinarySearchTreeNode* Search( TMVA::Event* event )
search the tree to find the node matching "event"
TMVA::BinarySearchTreeNode* Search(TMVA::Event* event, TMVA::Node* node)
 Private, recursive, function for searching.
Double_t GetSumOfWeights( void )
return the sum of event (node) weights
Int_t Fill( const DataSet& ds, TTree* theTree, Int_t theType, Types::EPreprocessingMethod corr, Types::ESBType type )
 create the search tree from the events in the DataSet
Int_t Fill( vector<TMVA::Event*> theTree, vector<Int_t> theVars, Int_t theType )
 create the search tree from the event collection 
 using ONLY the variables specified in "theVars"
Int_t Fill( vector<TMVA::Event*> theTree, Int_t theType )
 create the search tree from the events in a TTree
 using ALL the variables specified included in the Event
Double_t SearchVolume( TMVA::Volume* volume, std::vector<TMVA::Event*>* events )
search the whole tree and add up all weigths of events that 
 lie within the given voluem
Double_t SearchVolume( TMVA::Node* t, TMVA::Volume* volume, Int_t depth, std::vector<TMVA::Event*>* events )
 recursively walk through the daughter nodes and add up all weigths of events that 
 lie within the given volume
Bool_t InVolume( TMVA::Event* event, TMVA::Volume* volume )
 test if the data points are in the given volume
void SetPeriode( Int_t p )
set the periode (number of variables)
 return periode (number of variables)
{ fPeriode = p; }
UInt_t GetPeriode( void )
{ return fPeriode; }

Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
Last update: root/tmva $Id: BinarySearchTree.cxx,v 1.10 2006/11/20 15:35:28 brun Exp $
Copyright (c) 2005: *


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.