Logo ROOT   6.14/05
Reference Guide
List of all members | Public Member Functions | Private Member Functions | Private Attributes | List of all members
TMVA::kNN::Node< T > Class Template Reference

template<class T>
class TMVA::kNN::Node< T >

This file contains binary tree and global function template that searches tree for k-nearest neigbors.

Node class template parameter T has to provide these functions: rtype GetVar(UInt_t) const;

Find function template parameter T has to provide these functions: (in addition to above requirements) rtype GetDist(Float_t, UInt_t) const;

where T::GetDist(Float_t, UInt_t) <= T::GetDist(const T &) for any pair of events and any variable number for these events

Definition at line 66 of file NodekNN.h.

Public Member Functions

 Node (const Node *parent, const T &event, Int_t mod)
 
 ~Node ()
 
const NodeAdd (const T &event, UInt_t depth)
 This is Node member function that adds a new node to a binary tree. More...
 
const T & GetEvent () const
 
UInt_t GetMod () const
 
const NodeGetNodeL () const
 
const NodeGetNodeP () const
 
const NodeGetNodeR () const
 
Float_t GetVarDis () const
 
Float_t GetVarMax () const
 
Float_t GetVarMin () const
 
Double_t GetWeight () const
 
void Print () const
 
void Print (std::ostream &os, const std::string &offset="") const
 
void SetNodeL (Node *node)
 
void SetNodeR (Node *node)
 

Private Member Functions

 Node ()
 
 Node (const Node &)
 
const Nodeoperator= (const Node &)
 

Private Attributes

const T fEvent
 
const UInt_t fMod
 
NodefNodeL
 
const NodefNodeP
 
NodefNodeR
 
const Float_t fVarDis
 
Float_t fVarMax
 
Float_t fVarMin
 

#include <TMVA/NodekNN.h>

Constructor & Destructor Documentation

◆ Node() [1/3]

template<class T>
TMVA::kNN::Node< T >::Node ( const Node< T > *  parent,
const T &  event,
Int_t  mod 
)

Definition at line 224 of file NodekNN.h.

◆ ~Node()

template<class T >
TMVA::kNN::Node< T >::~Node ( )

Definition at line 237 of file NodekNN.h.

◆ Node() [2/3]

template<class T>
TMVA::kNN::Node< T >::Node ( )
private

◆ Node() [3/3]

template<class T>
TMVA::kNN::Node< T >::Node ( const Node< T > &  )
private

Member Function Documentation

◆ Add()

template<class T>
const TMVA::kNN::Node< T > * TMVA::kNN::Node< T >::Add ( const T &  event,
UInt_t  depth 
)

This is Node member function that adds a new node to a binary tree.

each node contains maximum and minimum values of splitting variable left or right nodes are added based on value of splitting variable

Definition at line 249 of file NodekNN.h.

◆ GetEvent()

template<class T >
const T & TMVA::kNN::Node< T >::GetEvent ( ) const
inline

Definition at line 156 of file NodekNN.h.

◆ GetMod()

template<class T >
UInt_t TMVA::kNN::Node< T >::GetMod ( ) const
inline

Definition at line 204 of file NodekNN.h.

◆ GetNodeL()

template<class T >
const Node< T > * TMVA::kNN::Node< T >::GetNodeL ( ) const
inline

Definition at line 162 of file NodekNN.h.

◆ GetNodeP()

template<class T >
const Node< T > * TMVA::kNN::Node< T >::GetNodeP ( ) const
inline

Definition at line 174 of file NodekNN.h.

◆ GetNodeR()

template<class T >
const Node< T > * TMVA::kNN::Node< T >::GetNodeR ( ) const
inline

Definition at line 168 of file NodekNN.h.

◆ GetVarDis()

template<class T >
Float_t TMVA::kNN::Node< T >::GetVarDis ( ) const
inline

Definition at line 186 of file NodekNN.h.

◆ GetVarMax()

template<class T >
Float_t TMVA::kNN::Node< T >::GetVarMax ( ) const
inline

Definition at line 198 of file NodekNN.h.

◆ GetVarMin()

template<class T >
Float_t TMVA::kNN::Node< T >::GetVarMin ( ) const
inline

Definition at line 192 of file NodekNN.h.

◆ GetWeight()

template<class T >
Double_t TMVA::kNN::Node< T >::GetWeight ( void  ) const
inline

Definition at line 180 of file NodekNN.h.

◆ operator=()

template<class T>
const Node& TMVA::kNN::Node< T >::operator= ( const Node< T > &  )
private

◆ Print() [1/2]

template<class T >
void TMVA::kNN::Node< T >::Print ( ) const

Definition at line 285 of file NodekNN.h.

◆ Print() [2/2]

template<class T >
void TMVA::kNN::Node< T >::Print ( std::ostream &  os,
const std::string &  offset = "" 
) const

Definition at line 292 of file NodekNN.h.

◆ SetNodeL()

template<class T >
void TMVA::kNN::Node< T >::SetNodeL ( Node< T > *  node)
inline

Definition at line 144 of file NodekNN.h.

◆ SetNodeR()

template<class T >
void TMVA::kNN::Node< T >::SetNodeR ( Node< T > *  node)
inline

Definition at line 150 of file NodekNN.h.

Member Data Documentation

◆ fEvent

template<class T>
const T TMVA::kNN::Node< T >::fEvent
private

Definition at line 111 of file NodekNN.h.

◆ fMod

template<class T>
const UInt_t TMVA::kNN::Node< T >::fMod
private

Definition at line 118 of file NodekNN.h.

◆ fNodeL

template<class T>
Node* TMVA::kNN::Node< T >::fNodeL
private

Definition at line 108 of file NodekNN.h.

◆ fNodeP

template<class T>
const Node* TMVA::kNN::Node< T >::fNodeP
private

Definition at line 106 of file NodekNN.h.

◆ fNodeR

template<class T>
Node* TMVA::kNN::Node< T >::fNodeR
private

Definition at line 109 of file NodekNN.h.

◆ fVarDis

template<class T>
const Float_t TMVA::kNN::Node< T >::fVarDis
private

Definition at line 113 of file NodekNN.h.

◆ fVarMax

template<class T>
Float_t TMVA::kNN::Node< T >::fVarMax
private

Definition at line 116 of file NodekNN.h.

◆ fVarMin

template<class T>
Float_t TMVA::kNN::Node< T >::fVarMin
private

Definition at line 115 of file NodekNN.h.

Libraries for TMVA::kNN::Node< T >:
[legend]

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