library: libTMVA
#include "BinaryTree.h"

TMVA::BinaryTree


class description - header file - source file - inheritance tree (.pdf)

class TMVA::BinaryTree

Inheritance Chart:
TMVA::BinaryTree
<-
TMVA::BinarySearchTree
TMVA::DecisionTree
    private:
void DeleteNode(TMVA::Node*) void Insert(TMVA::Event*, TMVA::Node*, Bool_t eventOwnership = kFALSE) ostream& PrintOrdered(ostream& os, TMVA::Node* n) const TMVA::Node* Search(TMVA::Event*, TMVA::Node*) const public:
BinaryTree() BinaryTree(const TMVA::BinaryTree&) virtual ~BinaryTree() static TClass* Class() Int_t CountNodes() Int_t GetNNodes() Int_t GetPeriode() const TMVA::Node* GetRoot() const Double_t GetSumOfWeights() void Insert(TMVA::Event*, Bool_t eventOwnership = kFALSE) virtual TClass* IsA() const TMVA::BinaryTree& operator=(const TMVA::BinaryTree&) void Print(ostream& os) const TMVA::Node* Search(TMVA::Event* event) const void SetPeriode(Int_t p) void SetRoot(TMVA::Node* r) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members

    private:
TMVA::Node* fRoot the root node of the tree Int_t fPeriode periode (number of event variables) Int_t fCurrentDepth internal variable, counting the depth of the tree during insertion protected:
Int_t fNNodes total number of nodes in the tree (counted) Double_t fSumOfWeights sum of the events (node) weights

Class Description

_______________________________________________________________________
                                                                      
 Base class for BinarySearch and Decision Trees                       
______________________________________________________________________
BinaryTree( void )
constructor for a yet "empty" tree. Needs to be filled afterwards
~BinaryTree( void )
destructor (deletes the nodes and "events" if owned by the tree
void DeleteNode( TMVA::Node* node )
 Private, recursive, function used by the class 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::Node* Search( TMVA::Event* event )
search the tree to find the node matching "event"
TMVA::Node* 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 GetNNodes( void )
 return the number of nodes in the tree (as counted during tree construction)
Int_t CountNodes()
 return the number of nodes in the tree. (make a new count --> takes time)
ostream & PrintOrdered( ostream & os, TMVA::Node* n )
print all events in binary tree (gives ordered output)
void Print(ostream & os)
recursively print the tree
BinaryTree( void )
 or a tree with Root node "n", any daughters of this node are automatically in the tree
void SetRoot( Node* r )
Node* GetRoot( void )
 Retrieves the address of the root node
void SetPeriode( Int_t p )
set the periode (number of variables)
Int_t GetPeriode( void )
 return periode (number of variables)

Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
Last update: root/tmva $Id: BinaryTree.cxx,v 1.3 2006/05/23 19:35:06 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.