#include <GBRTree.h>
Public Member Functions | |
std::vector< unsigned char > & | CutIndices () |
const std::vector< unsigned char > & | CutIndices () const |
std::vector< float > & | CutVals () |
const std::vector< float > & | CutVals () const |
GBRTree () | |
GBRTree (const TMVA::DecisionTree *tree) | |
double | GetResponse (const float *vector) const |
std::vector< int > & | LeftIndices () |
const std::vector< int > & | LeftIndices () const |
std::vector< float > & | Responses () |
const std::vector< float > & | Responses () const |
std::vector< int > & | RightIndices () |
const std::vector< int > & | RightIndices () const |
int | TerminalIndex (const float *vector) const |
virtual | ~GBRTree () |
Protected Member Functions | |
void | AddNode (const TMVA::DecisionTreeNode *node) |
unsigned int | CountIntermediateNodes (const TMVA::DecisionTreeNode *node) |
unsigned int | CountTerminalNodes (const TMVA::DecisionTreeNode *node) |
Protected Attributes | |
std::vector< unsigned char > | fCutIndices |
std::vector< float > | fCutVals |
std::vector< int > | fLeftIndices |
std::vector< float > | fResponses |
std::vector< int > | fRightIndices |
GBRTree::GBRTree | ( | ) |
GBRTree::GBRTree | ( | const TMVA::DecisionTree * | tree | ) | [explicit] |
virtual GBRTree::~GBRTree | ( | ) | [virtual] |
void GBRTree::AddNode | ( | const TMVA::DecisionTreeNode * | node | ) | [protected] |
unsigned int GBRTree::CountIntermediateNodes | ( | const TMVA::DecisionTreeNode * | node | ) | [protected] |
unsigned int GBRTree::CountTerminalNodes | ( | const TMVA::DecisionTreeNode * | node | ) | [protected] |
const std::vector<unsigned char>& GBRTree::CutIndices | ( | ) | const [inline] |
std::vector<unsigned char>& GBRTree::CutIndices | ( | ) | [inline] |
const std::vector<float>& GBRTree::CutVals | ( | ) | const [inline] |
std::vector<float>& GBRTree::CutVals | ( | ) | [inline] |
double GBRTree::GetResponse | ( | const float * | vector | ) | const [inline] |
Definition at line 77 of file GBRTree.h.
References fCutIndices, fCutVals, fLeftIndices, fResponses, fRightIndices, and getHLTprescales::index.
{ int index = 0; unsigned char cutindex = fCutIndices[0]; float cutval = fCutVals[0]; while (true) { if (vector[cutindex] > cutval) { index = fRightIndices[index]; } else { index = fLeftIndices[index]; } if (index>0) { cutindex = fCutIndices[index]; cutval = fCutVals[index]; } else { return fResponses[-index]; } } }
std::vector<int>& GBRTree::LeftIndices | ( | ) | [inline] |
const std::vector<int>& GBRTree::LeftIndices | ( | ) | const [inline] |
std::vector<float>& GBRTree::Responses | ( | ) | [inline] |
const std::vector<float>& GBRTree::Responses | ( | ) | const [inline] |
std::vector<int>& GBRTree::RightIndices | ( | ) | [inline] |
const std::vector<int>& GBRTree::RightIndices | ( | ) | const [inline] |
int GBRTree::TerminalIndex | ( | const float * | vector | ) | const [inline] |
Definition at line 107 of file GBRTree.h.
References fCutIndices, fCutVals, fLeftIndices, fRightIndices, and getHLTprescales::index.
{ int index = 0; unsigned char cutindex = fCutIndices[0]; float cutval = fCutVals[0]; while (true) { if (vector[cutindex] > cutval) { index = fRightIndices[index]; } else { index = fLeftIndices[index]; } if (index>0) { cutindex = fCutIndices[index]; cutval = fCutVals[index]; } else { return (-index); } } }
std::vector<unsigned char> GBRTree::fCutIndices [protected] |
Definition at line 68 of file GBRTree.h.
Referenced by CutIndices(), GetResponse(), and TerminalIndex().
std::vector<float> GBRTree::fCutVals [protected] |
Definition at line 69 of file GBRTree.h.
Referenced by CutVals(), GetResponse(), and TerminalIndex().
std::vector<int> GBRTree::fLeftIndices [protected] |
Definition at line 70 of file GBRTree.h.
Referenced by GetResponse(), LeftIndices(), and TerminalIndex().
std::vector<float> GBRTree::fResponses [protected] |
Definition at line 72 of file GBRTree.h.
Referenced by GetResponse(), and Responses().
std::vector<int> GBRTree::fRightIndices [protected] |
Definition at line 71 of file GBRTree.h.
Referenced by GetResponse(), RightIndices(), and TerminalIndex().