#include <GBRTree2D.h>
Public Member Functions | |
std::vector< unsigned short > & | CutIndices () |
const std::vector< unsigned short > & | CutIndices () const |
std::vector< float > & | CutVals () |
const std::vector< float > & | CutVals () const |
GBRTree2D () | |
void | GetResponse (const float *vector, double &x, double &y) const |
std::vector< int > & | LeftIndices () |
const std::vector< int > & | LeftIndices () const |
std::vector< float > & | ResponsesX () |
const std::vector< float > & | ResponsesX () const |
const std::vector< float > & | ResponsesY () const |
std::vector< float > & | ResponsesY () |
std::vector< int > & | RightIndices () |
const std::vector< int > & | RightIndices () const |
int | TerminalIndex (const float *vector) const |
~GBRTree2D () | |
Protected Attributes | |
std::vector< unsigned short > | fCutIndices |
std::vector< float > | fCutVals |
std::vector< int > | fLeftIndices |
std::vector< float > | fResponsesX |
std::vector< float > | fResponsesY |
std::vector< int > | fRightIndices |
Definition at line 29 of file GBRTree2D.h.
GBRTree2D::GBRTree2D | ( | ) | [inline] |
Definition at line 33 of file GBRTree2D.h.
{}
GBRTree2D::~GBRTree2D | ( | ) | [inline] |
Definition at line 34 of file GBRTree2D.h.
{}
std::vector<unsigned short>& GBRTree2D::CutIndices | ( | ) | [inline] |
const std::vector<unsigned short>& GBRTree2D::CutIndices | ( | ) | const [inline] |
std::vector<float>& GBRTree2D::CutVals | ( | ) | [inline] |
const std::vector<float>& GBRTree2D::CutVals | ( | ) | const [inline] |
void GBRTree2D::GetResponse | ( | const float * | vector, |
double & | x, | ||
double & | y | ||
) | const [inline] |
Definition at line 70 of file GBRTree2D.h.
References fCutIndices, fCutVals, fLeftIndices, fResponsesX, fResponsesY, fRightIndices, and getHLTprescales::index.
{ int index = 0; unsigned short 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 { x = fResponsesX[-index]; y = fResponsesY[-index]; return; } } }
std::vector<int>& GBRTree2D::LeftIndices | ( | ) | [inline] |
const std::vector<int>& GBRTree2D::LeftIndices | ( | ) | const [inline] |
const std::vector<float>& GBRTree2D::ResponsesX | ( | ) | const [inline] |
std::vector<float>& GBRTree2D::ResponsesX | ( | ) | [inline] |
std::vector<float>& GBRTree2D::ResponsesY | ( | ) | [inline] |
const std::vector<float>& GBRTree2D::ResponsesY | ( | ) | const [inline] |
std::vector<int>& GBRTree2D::RightIndices | ( | ) | [inline] |
const std::vector<int>& GBRTree2D::RightIndices | ( | ) | const [inline] |
int GBRTree2D::TerminalIndex | ( | const float * | vector | ) | const [inline] |
Definition at line 102 of file GBRTree2D.h.
References fCutIndices, fCutVals, fLeftIndices, fRightIndices, and getHLTprescales::index.
{ int index = 0; unsigned short 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 short> GBRTree2D::fCutIndices [protected] |
Definition at line 60 of file GBRTree2D.h.
Referenced by CutIndices(), GetResponse(), and TerminalIndex().
std::vector<float> GBRTree2D::fCutVals [protected] |
Definition at line 61 of file GBRTree2D.h.
Referenced by CutVals(), GetResponse(), and TerminalIndex().
std::vector<int> GBRTree2D::fLeftIndices [protected] |
Definition at line 62 of file GBRTree2D.h.
Referenced by GetResponse(), LeftIndices(), and TerminalIndex().
std::vector<float> GBRTree2D::fResponsesX [protected] |
Definition at line 64 of file GBRTree2D.h.
Referenced by GetResponse(), and ResponsesX().
std::vector<float> GBRTree2D::fResponsesY [protected] |
Definition at line 65 of file GBRTree2D.h.
Referenced by GetResponse(), and ResponsesY().
std::vector<int> GBRTree2D::fRightIndices [protected] |
Definition at line 63 of file GBRTree2D.h.
Referenced by GetResponse(), RightIndices(), and TerminalIndex().