#include <GBRTree.h>
Public Member Functions | |
GBRTree () | |
GBRTree (const TMVA::DecisionTree *tree) | |
double | GetResponse (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] |
double GBRTree::GetResponse | ( | const float * | vector | ) | const [inline] |
Definition at line 60 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<unsigned char> GBRTree::fCutIndices [protected] |
Definition at line 51 of file GBRTree.h.
Referenced by GetResponse().
std::vector<float> GBRTree::fCutVals [protected] |
Definition at line 52 of file GBRTree.h.
Referenced by GetResponse().
std::vector<int> GBRTree::fLeftIndices [protected] |
Definition at line 53 of file GBRTree.h.
Referenced by GetResponse().
std::vector<float> GBRTree::fResponses [protected] |
Definition at line 55 of file GBRTree.h.
Referenced by GetResponse().
std::vector<int> GBRTree::fRightIndices [protected] |
Definition at line 54 of file GBRTree.h.
Referenced by GetResponse().