Public Member Functions | Private Attributes | List of all members
lar_content::AdaBoostDecisionTree::Node Class Reference

Node class used for representing a decision tree. More...

Public Member Functions

 Node (const pandora::TiXmlHandle *const pXmlHandle)
 Constructor using xml handle to set member variables. More...
 
 Node (const Node &rhs)
 Copy constructor. More...
 
Nodeoperator= (const Node &rhs)
 Assignment operator. More...
 
 ~Node ()
 Destructor. More...
 
int GetNodeId () const
 Return node id. More...
 
int GetParentNodeId () const
 Return parent node id. More...
 
int GetLeftChildNodeId () const
 Return left child node id. More...
 
int GetRightChildNodeId () const
 Return right child node id. More...
 
bool IsLeaf () const
 Return is the node a leaf. More...
 
double GetThreshold () const
 Return node threshold. More...
 
int GetVariableId () const
 Return cut variable. More...
 
bool GetOutcome () const
 Return outcome. More...
 

Private Attributes

int m_nodeId
 Node id. More...
 
int m_parentNodeId
 Parent node id. More...
 
int m_leftChildNodeId
 Left child node id. More...
 
int m_rightChildNodeId
 Right child node id. More...
 
bool m_isLeaf
 Is node a leaf. More...
 
double m_threshold
 Threshold used for decision if decision node. More...
 
int m_variableId
 Variable cut on for decision if decision node. More...
 
bool m_outcome
 Outcome if leaf node. More...
 

Detailed Description

Node class used for representing a decision tree.

Definition at line 95 of file LArAdaBoostDecisionTree.h.

Constructor & Destructor Documentation

lar_content::AdaBoostDecisionTree::Node::Node ( const pandora::TiXmlHandle *const  pXmlHandle)

Constructor using xml handle to set member variables.

Parameters
pXmlHandlexml handle to use when setting member variables
lar_content::AdaBoostDecisionTree::Node::Node ( const Node rhs)

Copy constructor.

Parameters
rhsthe node to copy

Definition at line 223 of file LArAdaBoostDecisionTree.cc.

223  :
224  m_nodeId(rhs.m_nodeId),
225  m_parentNodeId(rhs.m_parentNodeId),
226  m_leftChildNodeId(rhs.m_leftChildNodeId),
227  m_rightChildNodeId(rhs.m_rightChildNodeId),
228  m_isLeaf(rhs.m_isLeaf),
229  m_threshold(rhs.m_threshold),
230  m_variableId(rhs.m_variableId),
231  m_outcome(rhs.m_outcome)
232 {
233 }
double m_threshold
Threshold used for decision if decision node.
int m_variableId
Variable cut on for decision if decision node.
lar_content::AdaBoostDecisionTree::Node::~Node ( )

Destructor.

Definition at line 256 of file LArAdaBoostDecisionTree.cc.

257 {
258 }

Member Function Documentation

int lar_content::AdaBoostDecisionTree::Node::GetLeftChildNodeId ( ) const
inline

Return left child node id.

Returns
left child node id

Definition at line 344 of file LArAdaBoostDecisionTree.h.

345 {
346  return m_leftChildNodeId;
347 }
int lar_content::AdaBoostDecisionTree::Node::GetNodeId ( ) const
inline

Return node id.

Returns
node id

Definition at line 330 of file LArAdaBoostDecisionTree.h.

331 {
332  return m_nodeId;
333 }
bool lar_content::AdaBoostDecisionTree::Node::GetOutcome ( ) const
inline

Return outcome.

Returns
outcome of cut

Definition at line 379 of file LArAdaBoostDecisionTree.h.

380 {
381  return m_outcome;
382 }
int lar_content::AdaBoostDecisionTree::Node::GetParentNodeId ( ) const
inline

Return parent node id.

Returns
parent node id

Definition at line 337 of file LArAdaBoostDecisionTree.h.

338 {
339  return m_parentNodeId;
340 }
int lar_content::AdaBoostDecisionTree::Node::GetRightChildNodeId ( ) const
inline

Return right child node id.

Returns
right child node id

Definition at line 351 of file LArAdaBoostDecisionTree.h.

352 {
353  return m_rightChildNodeId;
354 }
double lar_content::AdaBoostDecisionTree::Node::GetThreshold ( ) const
inline

Return node threshold.

Returns
threshold cut

Definition at line 365 of file LArAdaBoostDecisionTree.h.

366 {
367  return m_threshold;
368 }
double m_threshold
Threshold used for decision if decision node.
int lar_content::AdaBoostDecisionTree::Node::GetVariableId ( ) const
inline

Return cut variable.

Returns
variable cut on

Definition at line 372 of file LArAdaBoostDecisionTree.h.

373 {
374  return m_variableId;
375 }
int m_variableId
Variable cut on for decision if decision node.
bool lar_content::AdaBoostDecisionTree::Node::IsLeaf ( ) const
inline

Return is the node a leaf.

Returns
is node a leaf

Definition at line 358 of file LArAdaBoostDecisionTree.h.

359 {
360  return m_isLeaf;
361 }
AdaBoostDecisionTree::Node & lar_content::AdaBoostDecisionTree::Node::operator= ( const Node rhs)

Assignment operator.

Parameters
rhsthe node to assign

Definition at line 237 of file LArAdaBoostDecisionTree.cc.

238 {
239  if (this != &rhs)
240  {
241  m_nodeId = rhs.m_nodeId;
242  m_parentNodeId = rhs.m_parentNodeId;
243  m_leftChildNodeId = rhs.m_leftChildNodeId;
244  m_rightChildNodeId = rhs.m_rightChildNodeId;
245  m_isLeaf = rhs.m_isLeaf;
246  m_threshold = rhs.m_threshold;
247  m_variableId = rhs.m_variableId;
248  m_outcome = rhs.m_outcome;
249  }
250 
251  return *this;
252 }
double m_threshold
Threshold used for decision if decision node.
int m_variableId
Variable cut on for decision if decision node.

Member Data Documentation

bool lar_content::AdaBoostDecisionTree::Node::m_isLeaf
private

Is node a leaf.

Definition at line 185 of file LArAdaBoostDecisionTree.h.

int lar_content::AdaBoostDecisionTree::Node::m_leftChildNodeId
private

Left child node id.

Definition at line 183 of file LArAdaBoostDecisionTree.h.

int lar_content::AdaBoostDecisionTree::Node::m_nodeId
private

Node id.

Definition at line 181 of file LArAdaBoostDecisionTree.h.

bool lar_content::AdaBoostDecisionTree::Node::m_outcome
private

Outcome if leaf node.

Definition at line 188 of file LArAdaBoostDecisionTree.h.

int lar_content::AdaBoostDecisionTree::Node::m_parentNodeId
private

Parent node id.

Definition at line 182 of file LArAdaBoostDecisionTree.h.

int lar_content::AdaBoostDecisionTree::Node::m_rightChildNodeId
private

Right child node id.

Definition at line 184 of file LArAdaBoostDecisionTree.h.

double lar_content::AdaBoostDecisionTree::Node::m_threshold
private

Threshold used for decision if decision node.

Definition at line 186 of file LArAdaBoostDecisionTree.h.

int lar_content::AdaBoostDecisionTree::Node::m_variableId
private

Variable cut on for decision if decision node.

Definition at line 187 of file LArAdaBoostDecisionTree.h.


The documentation for this class was generated from the following files: