TMVA::BinarySearchTree Class Reference

#include <BinarySearchTree.h>

Inheritance diagram for TMVA::BinarySearchTree:

TMVA::BinaryTree TMVA::BinaryTree List of all members.

Public Member Functions

 BinarySearchTree (void)
 BinarySearchTree (const BinarySearchTree &b)
virtual ~BinarySearchTree (void)
virtual NodeCreateNode (UInt_t) const
virtual BinaryTreeCreateTree () const
virtual const char * ClassName () const
BinarySearchTreeNodeSearch (Event *event) const
void Insert (const Event *)
Double_t GetSumOfWeights (void) const
Double_t GetSumOfWeights (Int_t theType) const
void SetPeriode (Int_t p)
UInt_t GetPeriode (void) const
Double_t SearchVolume (Volume *, std::vector< const TMVA::BinarySearchTreeNode * > *events=0)
Double_t Fill (const std::vector< TMVA::Event * > &events, const std::vector< Int_t > &theVars, Int_t theType=-1)
Double_t Fill (const std::vector< TMVA::Event * > &events, Int_t theType=-1)
void NormalizeTree ()
void CalcStatistics (TMVA::Node *n=0)
void Clear (TMVA::Node *n=0)
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)
 BinarySearchTree (void)
 BinarySearchTree (const BinarySearchTree &b)
virtual ~BinarySearchTree (void)
virtual NodeCreateNode (UInt_t) const
virtual BinaryTreeCreateTree () const
virtual const char * ClassName () const
BinarySearchTreeNodeSearch (Event *event) const
void Insert (const Event *)
Double_t GetSumOfWeights (void) const
Double_t GetSumOfWeights (Int_t theType) const
void SetPeriode (Int_t p)
UInt_t GetPeriode (void) const
Double_t SearchVolume (Volume *, std::vector< const TMVA::BinarySearchTreeNode * > *events=0)
Double_t Fill (const std::vector< TMVA::Event * > &events, const std::vector< Int_t > &theVars, Int_t theType=-1)
Double_t Fill (const std::vector< TMVA::Event * > &events, Int_t theType=-1)
void NormalizeTree ()
void CalcStatistics (TMVA::Node *n=0)
void Clear (TMVA::Node *n=0)
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)

Static Public Member Functions

static BinarySearchTreeCreateFromXML (void *node, UInt_t tmva_Version_Code=TMVA_VERSION_CODE)
static BinarySearchTreeCreateFromXML (void *node, UInt_t tmva_Version_Code=TMVA_VERSION_CODE)

Private Member Functions

void Insert (const Event *, Node *)
BinarySearchTreeNodeSearch (Event *, Node *) const
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)
void Insert (const Event *, Node *)
BinarySearchTreeNodeSearch (Event *, Node *) const
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)

Private Attributes

UInt_t fPeriod
UInt_t fCurrentDepth
Bool_t fStatisticsIsValid
std::vector< Float_tfMeans [2]
std::vector< Float_tfRMS [2]
std::vector< Float_tfMin [2]
std::vector< Float_tfMax [2]
std::vector< Double_tfSum [2]
std::vector< Double_tfSumSq [2]
Double_t fNEventsW [2]
Double_t fSumOfWeights
Bool_t fCanNormalize
std::vector< std::pair< Double_t,
const TMVA::Event * > > 
fNormalizeTreeTable
std::vector< Float_tfMeans [2]
std::vector< Float_tfRMS [2]
std::vector< Float_tfMin [2]
std::vector< Float_tfMax [2]
std::vector< Double_tfSum [2]
std::vector< Double_tfSumSq [2]
std::vector< std::pair< Double_t,
const TMVA::Event * > > 
fNormalizeTreeTable

Detailed Description

Definition at line 72 of file BinarySearchTree.h.


Constructor & Destructor Documentation

TMVA::BinarySearchTree::BinarySearchTree ( void   ) 

Referenced by CreateFromXML(), and CreateTree().

TMVA::BinarySearchTree::BinarySearchTree ( const BinarySearchTree b  ) 

Definition at line 92 of file BinarySearchTree.cxx.

References Endl, fNEventsW, TMVA::kFATAL, and TMVA::BinaryTree::Log().

TMVA::BinarySearchTree::~BinarySearchTree ( void   )  [virtual]

Definition at line 106 of file BinarySearchTree.cxx.

References fNormalizeTreeTable.

TMVA::BinarySearchTree::BinarySearchTree ( void   ) 

TMVA::BinarySearchTree::BinarySearchTree ( const BinarySearchTree b  ) 

virtual TMVA::BinarySearchTree::~BinarySearchTree ( void   )  [virtual]


Member Function Documentation

virtual Node* TMVA::BinarySearchTree::CreateNode ( UInt_t   )  const [inline, virtual]

Implements TMVA::BinaryTree.

Definition at line 85 of file BinarySearchTree.h.

virtual BinaryTree* TMVA::BinarySearchTree::CreateTree (  )  const [inline, virtual]

Implements TMVA::BinaryTree.

Definition at line 86 of file BinarySearchTree.h.

References BinarySearchTree().

TMVA::BinarySearchTree * TMVA::BinarySearchTree::CreateFromXML ( void *  node,
UInt_t  tmva_Version_Code = TMVA_VERSION_CODE 
) [static]

Definition at line 117 of file BinarySearchTree.cxx.

References BinarySearchTree(), TMVA::gTools(), TMVA::Tools::ReadAttr(), TMVA::BinaryTree::ReadXML(), and type.

Referenced by G__G__TMVA2_259_0_5(), G__setup_memfuncTMVAcLcLBinarySearchTree(), and TMVA::MethodPDERS::ReadWeightsFromXML().

virtual const char* TMVA::BinarySearchTree::ClassName (  )  const [inline, virtual]

Implements TMVA::BinaryTree.

Definition at line 88 of file BinarySearchTree.h.

TMVA::BinarySearchTreeNode * TMVA::BinarySearchTree::Search ( Event event  )  const

Definition at line 204 of file BinarySearchTree.cxx.

Referenced by Search().

void TMVA::BinarySearchTree::Insert ( const Event  ) 

Definition at line 127 of file BinarySearchTree.cxx.

References Endl, Event, fCanNormalize, fCurrentDepth, TMVA::BinaryTree::fNNodes, fNormalizeTreeTable, fStatisticsIsValid, fSumOfWeights, TMVA::Event::GetNVariables(), GetPeriode(), TMVA::BinaryTree::GetRoot(), kFALSE, TMVA::kFATAL, TMVA::BinaryTree::Log(), NULL, TMVA::Node::SetDepth(), SetPeriode(), and TMVA::Node::SetPos().

Referenced by TMVA::PDEFoamDistr::FillBinarySearchTree(), and NormalizeTree().

Double_t TMVA::BinarySearchTree::GetSumOfWeights ( void   )  const

Definition at line 227 of file BinarySearchTree.cxx.

References Endl, fSumOfWeights, TMVA::kFATAL, TMVA::kWARNING, and TMVA::BinaryTree::Log().

Referenced by TMVA::MethodPDERS::CreateBinarySearchTree(), TMVA::MethodCuts::GetEffsfromSelection(), and TMVA::MethodPDERS::ReadWeightsFromXML().

Double_t TMVA::BinarySearchTree::GetSumOfWeights ( Int_t  theType  )  const

Definition at line 241 of file BinarySearchTree.cxx.

References Endl, fNEventsW, fSumOfWeights, TMVA::kFATAL, TMVA::Types::kSignal, TMVA::kWARNING, and TMVA::BinaryTree::Log().

void TMVA::BinarySearchTree::SetPeriode ( Int_t  p  )  [inline]

Definition at line 104 of file BinarySearchTree.h.

References fPeriod.

Referenced by TMVA::PDEFoamDistr::Initialize(), Insert(), TMVA::MethodPDERS::ReadWeightsFromStream(), and TMVA::MethodPDERS::ReadWeightsFromXML().

UInt_t TMVA::BinarySearchTree::GetPeriode ( void   )  const [inline]

Definition at line 107 of file BinarySearchTree.h.

References fPeriod.

Referenced by Insert().

Double_t TMVA::BinarySearchTree::SearchVolume ( Volume ,
std::vector< const TMVA::BinarySearchTreeNode * > *  events = 0 
)

Referenced by TMVA::PDEFoamDistr::Density(), TMVA::PDEFoamDistr::FillHist(), TMVA::MethodCuts::GetEffsfromSelection(), TMVA::MethodPDERS::GetSample(), and TMVA::MethodPDERS::GetVolumeContentForRoot().

Double_t TMVA::BinarySearchTree::Fill ( const std::vector< TMVA::Event * > &  events,
const std::vector< Int_t > &  theVars,
Int_t  theType = -1 
)

Referenced by TMVA::MethodPDERS::CreateBinarySearchTree(), TMVA::MethodCuts::GetEfficiency(), TMVA::MethodCuts::GetTrainingEfficiency(), and TMVA::MethodCuts::Train().

Double_t TMVA::BinarySearchTree::Fill ( const std::vector< TMVA::Event * > &  events,
Int_t  theType = -1 
)

void TMVA::BinarySearchTree::NormalizeTree (  ) 

Definition at line 349 of file BinarySearchTree.cxx.

References Clear(), fNormalizeTreeTable, kFALSE, NULL, SetNormalize(), and TMVA::BinaryTree::SetRoot().

Referenced by TMVA::MethodPDERS::CreateBinarySearchTree(), and NormalizeTree().

void TMVA::BinarySearchTree::CalcStatistics ( TMVA::Node n = 0  ) 

Definition at line 431 of file BinarySearchTree.cxx.

References fMax, fMeans, fMin, fNEventsW, fPeriod, fRMS, fStatisticsIsValid, fSum, fSumOfWeights, fSumSq, TMVA::BinarySearchTreeNode::GetEventV(), TMVA::Node::GetLeft(), TMVA::Node::GetRight(), TMVA::BinarySearchTreeNode::GetWeight(), TMVA::BinarySearchTreeNode::IsSignal(), j, kTRUE, n, NULL, TMath::Sqrt(), type, and val.

Referenced by TMVA::MethodPDERS::CalcAverages(), and TMVA::MethodPDERS::ReadWeightsFromXML().

void TMVA::BinarySearchTree::Clear ( TMVA::Node n = 0  ) 

Definition at line 359 of file BinarySearchTree.cxx.

References TMVA::Node::GetLeft(), TMVA::Node::GetRight(), n, and NULL.

Referenced by NormalizeTree().

Float_t TMVA::BinarySearchTree::Mean ( Types::ESBType  sb,
UInt_t  var 
) [inline]

Definition at line 126 of file BinarySearchTree.h.

References fMeans, and TMVA::Types::kSignal.

Referenced by TMVA::MethodCuts::Train().

Float_t TMVA::BinarySearchTree::RMS ( Types::ESBType  sb,
UInt_t  var 
) [inline]

Definition at line 129 of file BinarySearchTree.h.

References fRMS, and TMVA::Types::kSignal.

Referenced by TMVA::MethodPDERS::CalcAverages(), and TMVA::MethodCuts::Train().

Float_t TMVA::BinarySearchTree::Min ( Types::ESBType  sb,
UInt_t  var 
) [inline]

Definition at line 132 of file BinarySearchTree.h.

References fMin, and TMVA::Types::kSignal.

Referenced by TMVA::MethodCuts::Train().

Float_t TMVA::BinarySearchTree::Max ( Types::ESBType  sb,
UInt_t  var 
) [inline]

Definition at line 135 of file BinarySearchTree.h.

References fMax, and TMVA::Types::kSignal.

Referenced by TMVA::MethodCuts::Train().

Int_t TMVA::BinarySearchTree::SearchVolumeWithMaxLimit ( TMVA::Volume ,
std::vector< const TMVA::BinarySearchTreeNode * > *  events = 0,
Int_t  = -1 
)

Referenced by TMVA::MethodPDERS::GetSample().

Float_t TMVA::BinarySearchTree::RMS ( UInt_t  var  )  [inline]

Definition at line 140 of file BinarySearchTree.h.

References fRMS.

void TMVA::BinarySearchTree::SetNormalize ( Bool_t  norm  )  [inline]

Definition at line 142 of file BinarySearchTree.h.

References fCanNormalize.

Referenced by TMVA::MethodPDERS::CreateBinarySearchTree(), and NormalizeTree().

void TMVA::BinarySearchTree::Insert ( const Event ,
Node  
) [private]

Definition at line 159 of file BinarySearchTree.cxx.

References Endl, fCurrentDepth, TMVA::BinaryTree::fNNodes, fStatisticsIsValid, fSumOfWeights, TMVA::Node::GetDepth(), TMVA::Node::GetLeft(), TMVA::Event::GetNVariables(), TMVA::Node::GetRight(), TMVA::Event::GetWeight(), TMVA::Node::GoesLeft(), TMVA::Node::GoesRight(), kFALSE, TMVA::kFATAL, TMVA::BinaryTree::Log(), NULL, TMVA::Node::SetDepth(), TMVA::Node::SetLeft(), TMVA::Node::SetParent(), TMVA::Node::SetPos(), TMVA::Node::SetRight(), and TMVA::BinarySearchTreeNode::SetSelector().

TMVA::BinarySearchTreeNode * TMVA::BinarySearchTree::Search ( Event ,
Node  
) const [private]

Definition at line 211 of file BinarySearchTree.cxx.

References NULL, and Search().

Bool_t TMVA::BinarySearchTree::InVolume ( const std::vector< Float_t > &  ,
Volume  
) const [private]

Definition at line 417 of file BinarySearchTree.cxx.

References TMVA::Volume::fLower, fPeriod, TMVA::Volume::fUpper, if(), and result().

void TMVA::BinarySearchTree::DestroyNode ( BinarySearchTreeNode  )  [private]

void TMVA::BinarySearchTree::NormalizeTree ( std::vector< std::pair< Double_t, const TMVA::Event * > >::iterator  ,
std::vector< std::pair< Double_t, const TMVA::Event * > >::iterator  ,
UInt_t   
) [private]

Definition at line 292 of file BinarySearchTree.cxx.

References fPeriod, i, Insert(), NormalizeTree(), and sort().

Double_t TMVA::BinarySearchTree::SearchVolume ( Node ,
Volume ,
Int_t  ,
std::vector< const TMVA::BinarySearchTreeNode * > *  events 
) [private]

virtual Node* TMVA::BinarySearchTree::CreateNode ( UInt_t   )  const [inline, virtual]

Implements TMVA::BinaryTree.

Definition at line 85 of file BinarySearchTree.h.

virtual BinaryTree* TMVA::BinarySearchTree::CreateTree (  )  const [inline, virtual]

Implements TMVA::BinaryTree.

Definition at line 86 of file BinarySearchTree.h.

References BinarySearchTree().

static BinarySearchTree* TMVA::BinarySearchTree::CreateFromXML ( void *  node,
UInt_t  tmva_Version_Code = TMVA_VERSION_CODE 
) [static]

virtual const char* TMVA::BinarySearchTree::ClassName (  )  const [inline, virtual]

Implements TMVA::BinaryTree.

Definition at line 88 of file BinarySearchTree.h.

BinarySearchTreeNode* TMVA::BinarySearchTree::Search ( Event event  )  const

void TMVA::BinarySearchTree::Insert ( const Event  ) 

Double_t TMVA::BinarySearchTree::GetSumOfWeights ( void   )  const

Double_t TMVA::BinarySearchTree::GetSumOfWeights ( Int_t  theType  )  const

void TMVA::BinarySearchTree::SetPeriode ( Int_t  p  )  [inline]

Definition at line 104 of file BinarySearchTree.h.

References fPeriod.

UInt_t TMVA::BinarySearchTree::GetPeriode ( void   )  const [inline]

Definition at line 107 of file BinarySearchTree.h.

References fPeriod.

Double_t TMVA::BinarySearchTree::SearchVolume ( Volume ,
std::vector< const TMVA::BinarySearchTreeNode * > *  events = 0 
)

Double_t TMVA::BinarySearchTree::Fill ( const std::vector< TMVA::Event * > &  events,
const std::vector< Int_t > &  theVars,
Int_t  theType = -1 
)

Double_t TMVA::BinarySearchTree::Fill ( const std::vector< TMVA::Event * > &  events,
Int_t  theType = -1 
)

void TMVA::BinarySearchTree::NormalizeTree (  ) 

void TMVA::BinarySearchTree::CalcStatistics ( TMVA::Node n = 0  ) 

void TMVA::BinarySearchTree::Clear ( TMVA::Node n = 0  ) 

Float_t TMVA::BinarySearchTree::Mean ( Types::ESBType  sb,
UInt_t  var 
) [inline]

Definition at line 126 of file BinarySearchTree.h.

References fMeans, and TMVA::Types::kSignal.

Float_t TMVA::BinarySearchTree::RMS ( Types::ESBType  sb,
UInt_t  var 
) [inline]

Definition at line 129 of file BinarySearchTree.h.

References fRMS, and TMVA::Types::kSignal.

Float_t TMVA::BinarySearchTree::Min ( Types::ESBType  sb,
UInt_t  var 
) [inline]

Definition at line 132 of file BinarySearchTree.h.

References fMin, and TMVA::Types::kSignal.

Float_t TMVA::BinarySearchTree::Max ( Types::ESBType  sb,
UInt_t  var 
) [inline]

Definition at line 135 of file BinarySearchTree.h.

References fMax, and TMVA::Types::kSignal.

Int_t TMVA::BinarySearchTree::SearchVolumeWithMaxLimit ( TMVA::Volume ,
std::vector< const TMVA::BinarySearchTreeNode * > *  events = 0,
Int_t  = -1 
)

Float_t TMVA::BinarySearchTree::RMS ( UInt_t  var  )  [inline]

Definition at line 140 of file BinarySearchTree.h.

References fRMS.

void TMVA::BinarySearchTree::SetNormalize ( Bool_t  norm  )  [inline]

Definition at line 142 of file BinarySearchTree.h.

References fCanNormalize.

void TMVA::BinarySearchTree::Insert ( const Event ,
Node  
) [private]

BinarySearchTreeNode* TMVA::BinarySearchTree::Search ( Event ,
Node  
) const [private]

Bool_t TMVA::BinarySearchTree::InVolume ( const std::vector< Float_t > &  ,
Volume  
) const [private]

void TMVA::BinarySearchTree::DestroyNode ( BinarySearchTreeNode  )  [private]

void TMVA::BinarySearchTree::NormalizeTree ( std::vector< std::pair< Double_t, const TMVA::Event * > >::iterator  ,
std::vector< std::pair< Double_t, const TMVA::Event * > >::iterator  ,
UInt_t   
) [private]

Double_t TMVA::BinarySearchTree::SearchVolume ( Node ,
Volume ,
Int_t  ,
std::vector< const TMVA::BinarySearchTreeNode * > *  events 
) [private]


Member Data Documentation

UInt_t TMVA::BinarySearchTree::fPeriod [private]

Definition at line 163 of file BinarySearchTree.h.

Referenced by CalcStatistics(), GetPeriode(), InVolume(), NormalizeTree(), and SetPeriode().

UInt_t TMVA::BinarySearchTree::fCurrentDepth [private]

Definition at line 164 of file BinarySearchTree.h.

Referenced by Insert().

Bool_t TMVA::BinarySearchTree::fStatisticsIsValid [private]

Definition at line 165 of file BinarySearchTree.h.

Referenced by CalcStatistics(), and Insert().

std::vector<Float_t> TMVA::BinarySearchTree::fMeans[2] [private]

Definition at line 167 of file BinarySearchTree.h.

Referenced by CalcStatistics(), and Mean().

std::vector<Float_t> TMVA::BinarySearchTree::fRMS[2] [private]

Definition at line 168 of file BinarySearchTree.h.

Referenced by CalcStatistics(), and RMS().

std::vector<Float_t> TMVA::BinarySearchTree::fMin[2] [private]

Definition at line 169 of file BinarySearchTree.h.

Referenced by CalcStatistics(), and Min().

std::vector<Float_t> TMVA::BinarySearchTree::fMax[2] [private]

Definition at line 170 of file BinarySearchTree.h.

Referenced by CalcStatistics(), and Max().

std::vector<Double_t> TMVA::BinarySearchTree::fSum[2] [private]

Definition at line 171 of file BinarySearchTree.h.

Referenced by CalcStatistics().

std::vector<Double_t> TMVA::BinarySearchTree::fSumSq[2] [private]

Definition at line 172 of file BinarySearchTree.h.

Referenced by CalcStatistics().

Double_t TMVA::BinarySearchTree::fNEventsW [private]

Definition at line 173 of file BinarySearchTree.h.

Referenced by BinarySearchTree(), CalcStatistics(), and GetSumOfWeights().

Double_t TMVA::BinarySearchTree::fSumOfWeights [private]

Definition at line 174 of file BinarySearchTree.h.

Referenced by CalcStatistics(), GetSumOfWeights(), and Insert().

Bool_t TMVA::BinarySearchTree::fCanNormalize [private]

Definition at line 177 of file BinarySearchTree.h.

Referenced by Insert(), and SetNormalize().

std::vector< std::pair<Double_t,const TMVA::Event*> > TMVA::BinarySearchTree::fNormalizeTreeTable [private]

Definition at line 178 of file BinarySearchTree.h.

Referenced by Insert(), NormalizeTree(), and ~BinarySearchTree().

std::vector<Float_t> TMVA::BinarySearchTree::fMeans[2] [private]

Definition at line 167 of file BinarySearchTree.h.

std::vector<Float_t> TMVA::BinarySearchTree::fRMS[2] [private]

Definition at line 168 of file BinarySearchTree.h.

std::vector<Float_t> TMVA::BinarySearchTree::fMin[2] [private]

Definition at line 169 of file BinarySearchTree.h.

std::vector<Float_t> TMVA::BinarySearchTree::fMax[2] [private]

Definition at line 170 of file BinarySearchTree.h.

std::vector<Double_t> TMVA::BinarySearchTree::fSum[2] [private]

Definition at line 171 of file BinarySearchTree.h.

std::vector<Double_t> TMVA::BinarySearchTree::fSumSq[2] [private]

Definition at line 172 of file BinarySearchTree.h.

std::vector< std::pair<Double_t,const TMVA::Event*> > TMVA::BinarySearchTree::fNormalizeTreeTable [private]

Definition at line 178 of file BinarySearchTree.h.


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