FairRoot/PandaRoot
Public Member Functions | Private Member Functions | Private Attributes | List of all members
PndSomNode Class Reference

#include <PndSomNode.h>

Public Member Functions

 PndSomNode ()
 
 PndSomNode (size_t WeightsDim)
 
 PndSomNode (std::vector< float > const &weight)
 
 PndSomNode (std::string const &label, std::vector< float > const &weight)
 
 PndSomNode (int lft, int top, int rgt, int bot, size_t WeightsDim=0)
 
 PndSomNode (int lft, int top, int rgt, int bot, size_t WeightsDim, std::string const &label)
 
 PndSomNode (int lft, int top, int rgt, int bot, std::string const &label, std::vector< float > const &weight)
 
 PndSomNode (PndSomNode const &oth)
 
virtual ~PndSomNode ()
 
PndSomNodeoperator= (PndSomNode const &oth)
 
virtual void InitNode ()
 
int GetLeft () const
 
void SetLeft (int val)
 
int GetRight () const
 
void SetRight (int val)
 
int GetTop () const
 
void SetTop (int val)
 
int GetBottom () const
 
void SetBottom (int val)
 
size_t GetNodeDimension () const
 
void SetNodeDimension (size_t val)
 
std::string const & GetLabel () const
 
void SetLabel (std::string const &val)
 
std::vector< float > const & GetWeight () const
 
void SetWeight (std::vector< float > const &val)
 
void SetNeighbours (std::vector< std::pair< size_t, double > > const &val)
 
std::vector< std::pair< size_t,
double > > const & 
GetNeighbours () const
 
double GetXPos () const
 
void SetXPos (double xp)
 
double GetYPos () const
 
void SetYPos (double yp)
 
void ResetRespList ()
 
void AddToRespList (size_t idx)
 
void SetRespList (std::vector< size_t > const &val)
 
std::vector< size_t > const & GetRespoList () const
 
void SetLabelMap (std::map< std::string, size_t > const &val)
 
std::map< std::string, size_t >
const & 
GetLabelMap () const
 

Private Member Functions

void ClearInternalStructures ()
 
void AdjustWeights (std::vector< double > const &target, double LearningRate, double Influence)
 

Private Attributes

int m_iLeft
 
int m_iTop
 
int m_iRight
 
int m_iBottom
 
double m_xPos
 
double m_yPos
 
size_t m_weightDim
 
std::string m_label
 
std::vector< float > m_Weights
 
std::vector< size_t > m_RespNodeIndex
 
std::vector< std::pair< size_t,
double > > 
m_NeighbourList
 
std::map< std::string, size_t > m_labelCnts
 

Detailed Description

Definition at line 20 of file PndSomNode.h.

Constructor & Destructor Documentation

PndSomNode::PndSomNode ( )

Default constructor.

PndSomNode::PndSomNode ( size_t  WeightsDim)
explicit

Constructor

Parameters
WeightsDimDimension of the weights.
PndSomNode::PndSomNode ( std::vector< float > const &  weight)
explicit

Constructor

Parameters
weightWeights of the current node.
PndSomNode::PndSomNode ( std::string const &  label,
std::vector< float > const &  weight 
)

Constructor

Parameters
labelAssigned label to the current node.
weightWeights of the current node.
PndSomNode::PndSomNode ( int  lft,
int  top,
int  rgt,
int  bot,
size_t  WeightsDim = 0 
)

Constructor

Parameters
lftLeft neighbour.
topTop neighbour.
rgtRight neighbour.
botBottom neighbour.
WeightsDimDimension of the weights.
PndSomNode::PndSomNode ( int  lft,
int  top,
int  rgt,
int  bot,
size_t  WeightsDim,
std::string const &  label 
)

Constructor

Parameters
lftLeft neighbour.
topTop neighbour.
rgtRight neighbour.
botBottom neighbour.
WeightsDimDimension of the weights.
labelAssigned label to the current node.
PndSomNode::PndSomNode ( int  lft,
int  top,
int  rgt,
int  bot,
std::string const &  label,
std::vector< float > const &  weight 
)

Constructor

Parameters
lftLeft neighbour.
topTop neighbour.
rgtRight neighbour.
botBottom neighbour.
labelAssigned label to the current node.
weightWeights of the current node.
PndSomNode::PndSomNode ( PndSomNode const &  oth)
virtual PndSomNode::~PndSomNode ( )
virtual

Member Function Documentation

void PndSomNode::AddToRespList ( size_t  idx)

Modify the node responsibility list

void PndSomNode::AdjustWeights ( std::vector< double > const &  target,
double  LearningRate,
double  Influence 
)
private
void PndSomNode::ClearInternalStructures ( )
private

Debug functions

int PndSomNode::GetBottom ( ) const
inline

Definition at line 263 of file PndSomNode.h.

References m_iBottom.

264 {
265  return this->m_iBottom;
266 };
int m_iBottom
Definition: PndSomNode.h:204
std::string const & PndSomNode::GetLabel ( ) const
inline

Modify node label (class name)

Definition at line 283 of file PndSomNode.h.

References m_label.

284 {
285  return this->m_label;
286 };
std::string m_label
Definition: PndSomNode.h:214
std::map<std::string, size_t> const& PndSomNode::GetLabelMap ( ) const
int PndSomNode::GetLeft ( void  ) const
inline

Getter and setters for the neighbours.

Definition at line 233 of file PndSomNode.h.

References m_iLeft.

234 {
235  return this->m_iLeft;
236 };
std::vector< std::pair< size_t, double > > const & PndSomNode::GetNeighbours ( ) const
inline

Get the neigbours of the current node.

Returns
The neigbours of the current node.

Definition at line 318 of file PndSomNode.h.

References m_NeighbourList.

319 {
320  return this->m_NeighbourList;
321 };
std::vector< std::pair< size_t, double > > m_NeighbourList
Definition: PndSomNode.h:226
size_t PndSomNode::GetNodeDimension ( ) const
inline

Modify node weight dimension

Definition at line 273 of file PndSomNode.h.

References m_weightDim.

274 {
275  return this->m_weightDim;
276 };
size_t m_weightDim
Definition: PndSomNode.h:211
std::vector<size_t> const& PndSomNode::GetRespoList ( ) const
int PndSomNode::GetRight ( void  ) const
inline

Definition at line 243 of file PndSomNode.h.

References m_iRight.

244 {
245  return this->m_iRight;
246 };
int m_iRight
Definition: PndSomNode.h:203
int PndSomNode::GetTop ( ) const
inline

Definition at line 253 of file PndSomNode.h.

References m_iTop.

254 {
255  return this->m_iTop;
256 };
std::vector< float > const & PndSomNode::GetWeight ( ) const
inline

Get the weights for the current node.

Returns
The weights of the current node.

Definition at line 293 of file PndSomNode.h.

References m_Weights.

294 {
295  return this->m_Weights;
296 };
std::vector< float > m_Weights
Definition: PndSomNode.h:217
double PndSomNode::GetXPos ( ) const
inline

Position of the node in the grid. The position is the center point of each mesh node.

Definition at line 298 of file PndSomNode.h.

References m_xPos.

299 {
300  return this->m_xPos;
301 };
double m_xPos
Definition: PndSomNode.h:207
double PndSomNode::GetYPos ( ) const
inline

Definition at line 308 of file PndSomNode.h.

References m_yPos.

309 {
310  return this->m_yPos;
311 };
double m_yPos
Definition: PndSomNode.h:208
virtual void PndSomNode::InitNode ( )
virtual
PndSomNode& PndSomNode::operator= ( PndSomNode const &  oth)
void PndSomNode::ResetRespList ( )

Removes all elements from the responsibility list.

void PndSomNode::SetBottom ( int  val)
inline

Definition at line 268 of file PndSomNode.h.

References m_iBottom, and val.

269 {
270  this->m_iBottom = val;
271 };
Double_t val[nBoxes][nFEBox]
Definition: createCalib.C:11
int m_iBottom
Definition: PndSomNode.h:204
void PndSomNode::SetLabel ( std::string const &  val)
inline

Definition at line 288 of file PndSomNode.h.

References m_label, and val.

289 {
290  this->m_label = val;
291 };
Double_t val[nBoxes][nFEBox]
Definition: createCalib.C:11
std::string m_label
Definition: PndSomNode.h:214
void PndSomNode::SetLabelMap ( std::map< std::string, size_t > const &  val)

Modify the node label map. This map contains the labels of training data for which this node hase been the BMU.

void PndSomNode::SetLeft ( int  val)
inline

Definition at line 238 of file PndSomNode.h.

References m_iLeft, and val.

239 {
240  this->m_iLeft = val;
241 };
Double_t val[nBoxes][nFEBox]
Definition: createCalib.C:11
void PndSomNode::SetNeighbours ( std::vector< std::pair< size_t, double > > const &  val)

Set neigbours for the current node.

Parameters
valThe vector containing the neighbour indices.
void PndSomNode::SetNodeDimension ( size_t  val)
inline

Definition at line 278 of file PndSomNode.h.

References m_weightDim, and val.

279 {
280  this->m_weightDim = val;
281 };
Double_t val[nBoxes][nFEBox]
Definition: createCalib.C:11
size_t m_weightDim
Definition: PndSomNode.h:211
void PndSomNode::SetRespList ( std::vector< size_t > const &  val)
void PndSomNode::SetRight ( int  val)
inline

Definition at line 248 of file PndSomNode.h.

References m_iRight, and val.

249 {
250  this->m_iRight = val;
251 };
Double_t val[nBoxes][nFEBox]
Definition: createCalib.C:11
int m_iRight
Definition: PndSomNode.h:203
void PndSomNode::SetTop ( int  val)
inline

Definition at line 258 of file PndSomNode.h.

References m_iTop, and val.

259 {
260  this->m_iTop = val;
261 };
Double_t val[nBoxes][nFEBox]
Definition: createCalib.C:11
void PndSomNode::SetWeight ( std::vector< float > const &  val)

Set weights for the current node.

Parameters
valThe vector containing the weight for the current node.
void PndSomNode::SetXPos ( double  xp)
inline

Definition at line 303 of file PndSomNode.h.

References m_xPos.

304 {
305  this->m_xPos = xp;
306 };
double m_xPos
Definition: PndSomNode.h:207
void PndSomNode::SetYPos ( double  yp)
inline

Definition at line 313 of file PndSomNode.h.

References m_yPos.

314 {
315  this->m_yPos = yp;
316 };
double m_yPos
Definition: PndSomNode.h:208

Member Data Documentation

int PndSomNode::m_iBottom
private

Definition at line 204 of file PndSomNode.h.

Referenced by GetBottom(), and SetBottom().

int PndSomNode::m_iLeft
private

Definition at line 201 of file PndSomNode.h.

Referenced by GetLeft(), and SetLeft().

int PndSomNode::m_iRight
private

Definition at line 203 of file PndSomNode.h.

Referenced by GetRight(), and SetRight().

int PndSomNode::m_iTop
private

Definition at line 202 of file PndSomNode.h.

Referenced by GetTop(), and SetTop().

std::string PndSomNode::m_label
private

Definition at line 214 of file PndSomNode.h.

Referenced by GetLabel(), and SetLabel().

std::map<std::string, size_t> PndSomNode::m_labelCnts
private

Definition at line 229 of file PndSomNode.h.

std::vector< std::pair<size_t, double> > PndSomNode::m_NeighbourList
private

Definition at line 226 of file PndSomNode.h.

Referenced by GetNeighbours().

std::vector<size_t> PndSomNode::m_RespNodeIndex
private

Definition at line 223 of file PndSomNode.h.

size_t PndSomNode::m_weightDim
private

Definition at line 211 of file PndSomNode.h.

Referenced by GetNodeDimension(), and SetNodeDimension().

std::vector<float> PndSomNode::m_Weights
private

Definition at line 217 of file PndSomNode.h.

Referenced by GetWeight().

double PndSomNode::m_xPos
private

Definition at line 207 of file PndSomNode.h.

Referenced by GetXPos(), and SetXPos().

double PndSomNode::m_yPos
private

Definition at line 208 of file PndSomNode.h.

Referenced by GetYPos(), and SetYPos().


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