#include <BinarySearchTree.h>
Inheritance diagram for TMVA::BinarySearchTree:
Public Member Functions | |
BinarySearchTree (void) | |
BinarySearchTree (const BinarySearchTree &b) | |
virtual | ~BinarySearchTree (void) |
virtual Node * | CreateNode (UInt_t) const |
virtual BinaryTree * | CreateTree () const |
virtual const char * | ClassName () const |
BinarySearchTreeNode * | Search (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 Node * | CreateNode (UInt_t) const |
virtual BinaryTree * | CreateTree () const |
virtual const char * | ClassName () const |
BinarySearchTreeNode * | Search (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 BinarySearchTree * | CreateFromXML (void *node, UInt_t tmva_Version_Code=TMVA_VERSION_CODE) |
static BinarySearchTree * | CreateFromXML (void *node, UInt_t tmva_Version_Code=TMVA_VERSION_CODE) |
Private Member Functions | |
void | Insert (const Event *, Node *) |
BinarySearchTreeNode * | Search (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 *) |
BinarySearchTreeNode * | Search (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_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 |
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] |
std::vector< std::pair< Double_t, const TMVA::Event * > > | fNormalizeTreeTable |
Definition at line 72 of file BinarySearchTree.h.
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] |
TMVA::BinarySearchTree::BinarySearchTree | ( | void | ) |
TMVA::BinarySearchTree::BinarySearchTree | ( | const BinarySearchTree & | b | ) |
virtual TMVA::BinarySearchTree::~BinarySearchTree | ( | void | ) | [virtual] |
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] |
TMVA::BinarySearchTreeNode * TMVA::BinarySearchTree::Search | ( | Event * | event | ) | const |
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().
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] |
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 | ( | ) |
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().
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().
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] |
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 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] |
BinarySearchTreeNode* TMVA::BinarySearchTree::Search | ( | Event * | event | ) | const |
void TMVA::BinarySearchTree::Insert | ( | const Event * | ) |
Double_t TMVA::BinarySearchTree::GetSumOfWeights | ( | void | ) | const |
void TMVA::BinarySearchTree::SetPeriode | ( | Int_t | p | ) | [inline] |
UInt_t TMVA::BinarySearchTree::GetPeriode | ( | void | ) | const [inline] |
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] |
Float_t TMVA::BinarySearchTree::RMS | ( | Types::ESBType | sb, | |
UInt_t | var | |||
) | [inline] |
Float_t TMVA::BinarySearchTree::Min | ( | Types::ESBType | sb, | |
UInt_t | var | |||
) | [inline] |
Float_t TMVA::BinarySearchTree::Max | ( | Types::ESBType | sb, | |
UInt_t | var | |||
) | [inline] |
Int_t TMVA::BinarySearchTree::SearchVolumeWithMaxLimit | ( | TMVA::Volume * | , | |
std::vector< const TMVA::BinarySearchTreeNode * > * | events = 0 , |
|||
Int_t | = -1 | |||
) |
void TMVA::BinarySearchTree::SetNormalize | ( | Bool_t | norm | ) | [inline] |
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] |
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] |
std::vector<Float_t> TMVA::BinarySearchTree::fMeans[2] [private] |
std::vector<Float_t> TMVA::BinarySearchTree::fRMS[2] [private] |
std::vector<Float_t> TMVA::BinarySearchTree::fMin[2] [private] |
std::vector<Float_t> TMVA::BinarySearchTree::fMax[2] [private] |
std::vector<Double_t> TMVA::BinarySearchTree::fSum[2] [private] |
std::vector<Double_t> TMVA::BinarySearchTree::fSumSq[2] [private] |
Double_t TMVA::BinarySearchTree::fNEventsW [private] |
Definition at line 173 of file BinarySearchTree.h.
Referenced by BinarySearchTree(), CalcStatistics(), and GetSumOfWeights().
Definition at line 174 of file BinarySearchTree.h.
Referenced by CalcStatistics(), GetSumOfWeights(), and Insert().
Bool_t TMVA::BinarySearchTree::fCanNormalize [private] |
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.