MVAUtils::Node Class Reference

#include <Node.h>

List of all members.

Public Types

typedef int32_t index_t
 The index type of the node in the vector.
typedef int8_t var_t
 The variable type (i.e., the index of the variable to cut).

Public Member Functions

 Node (const int ivar, const float val, const index_t right)
bool IsLeaf () const
 is the current node a leaf node
index_t GetNext (const float value, index_t index) const
var_t GetVar () const
float GetVal () const
index_t GetLeft (index_t index) const
index_t GetRight (index_t index) const
void Print (index_t index) const

Detailed Description

Node of a binary tree, defined by the index of the variable (m_var, set to -1 for leaf nodes), the cut value or the response (m_val) and ways to access the left and right children.

NOTE: This class should not be used directly by any class other than BDT.


Constructor & Destructor Documentation

MVAUtils::Node::Node ( const int  ivar,
const float  val,
const index_t  right 
) [inline]

The constructor gets the index of the variable to cut on (-1 if leaf), the index of the right child (value not used if a leaf), and the value to cut on (if not leaf) or the respons (if leaf).


Member Function Documentation

index_t MVAUtils::Node::GetLeft ( index_t  index  )  const [inline]

For debugging: returns the index of the left node; is passed the current node index.

Node::index_t Node::GetNext ( const float  value,
Node::index_t  index 
) const

Based on the value of the variable that's passed in, return the index of the appropriate child. Assumes the node is not a leaf (i.e., there is no check). Must also pass the current node index.

index_t MVAUtils::Node::GetRight ( index_t  index  )  const [inline]

For debugging: returns the index of the right node; is passed the current node index.

float MVAUtils::Node::GetVal (  )  const [inline]

The value to cut on (if not leaf), or the response (if leaf).

var_t MVAUtils::Node::GetVar (  )  const [inline]

The variable index to cut on (or -1 if leaf, but use IsLeaf instead if checking for leaf)

void Node::Print ( Node::index_t  index  )  const

For debugging only: print the node values


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 1 Dec 2017 for RootCore Packages by  doxygen 1.6.1