PandaRoot
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
 

Detailed Description

Definition at line 20 of file PndSomNode.h.

Constructor & Destructor Documentation

◆ PndSomNode() [1/8]

PndSomNode::PndSomNode ( )

Default constructor.

◆ PndSomNode() [2/8]

PndSomNode::PndSomNode ( size_t  WeightsDim)
explicit

Constructor

Parameters
WeightsDimDimension of the weights.

◆ PndSomNode() [3/8]

PndSomNode::PndSomNode ( std::vector< float > const &  weight)
explicit

Constructor

Parameters
weightWeights of the current node.

◆ PndSomNode() [4/8]

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() [5/8]

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() [6/8]

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() [7/8]

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() [8/8]

PndSomNode::PndSomNode ( PndSomNode const &  oth)

◆ ~PndSomNode()

virtual PndSomNode::~PndSomNode ( )
virtual

Member Function Documentation

◆ AddToRespList()

void PndSomNode::AddToRespList ( size_t  idx)

Modify the node responsibility list

◆ GetBottom()

int PndSomNode::GetBottom ( ) const
inline

Definition at line 258 of file PndSomNode.h.

259 {
260  return this->m_iBottom;
261 };

◆ GetLabel()

std::string const & PndSomNode::GetLabel ( ) const
inline

Modify node label (class name)

Definition at line 278 of file PndSomNode.h.

279 {
280  return this->m_label;
281 };

◆ GetLabelMap()

std::map<std::string, size_t> const& PndSomNode::GetLabelMap ( ) const

◆ GetLeft()

int PndSomNode::GetLeft ( ) const
inline

Getter and setters for the neighbours.

Definition at line 228 of file PndSomNode.h.

229 {
230  return this->m_iLeft;
231 };

◆ GetNeighbours()

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 313 of file PndSomNode.h.

314 {
315  return this->m_NeighbourList;
316 };

◆ GetNodeDimension()

size_t PndSomNode::GetNodeDimension ( ) const
inline

Modify node weight dimension

Definition at line 268 of file PndSomNode.h.

269 {
270  return this->m_weightDim;
271 };

◆ GetRespoList()

std::vector<size_t> const& PndSomNode::GetRespoList ( ) const

◆ GetRight()

int PndSomNode::GetRight ( ) const
inline

Definition at line 238 of file PndSomNode.h.

239 {
240  return this->m_iRight;
241 };

◆ GetTop()

int PndSomNode::GetTop ( ) const
inline

Definition at line 248 of file PndSomNode.h.

249 {
250  return this->m_iTop;
251 };

◆ GetWeight()

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 288 of file PndSomNode.h.

289 {
290  return this->m_Weights;
291 };

◆ GetXPos()

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 293 of file PndSomNode.h.

294 {
295  return this->m_xPos;
296 };

◆ GetYPos()

double PndSomNode::GetYPos ( ) const
inline

Definition at line 303 of file PndSomNode.h.

304 {
305  return this->m_yPos;
306 };

◆ InitNode()

virtual void PndSomNode::InitNode ( )
virtual

◆ operator=()

PndSomNode& PndSomNode::operator= ( PndSomNode const &  oth)

◆ ResetRespList()

void PndSomNode::ResetRespList ( )

Removes all elements from the responsibility list.

◆ SetBottom()

void PndSomNode::SetBottom ( int  val)
inline

Definition at line 263 of file PndSomNode.h.

264 {
265  this->m_iBottom = val;
266 };

◆ SetLabel()

void PndSomNode::SetLabel ( std::string const &  val)
inline

Definition at line 283 of file PndSomNode.h.

284 {
285  this->m_label = val;
286 };

◆ SetLabelMap()

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.

◆ SetLeft()

void PndSomNode::SetLeft ( int  val)
inline

Definition at line 233 of file PndSomNode.h.

234 {
235  this->m_iLeft = val;
236 };

◆ SetNeighbours()

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.

◆ SetNodeDimension()

void PndSomNode::SetNodeDimension ( size_t  val)
inline

Definition at line 273 of file PndSomNode.h.

274 {
275  this->m_weightDim = val;
276 };

◆ SetRespList()

void PndSomNode::SetRespList ( std::vector< size_t > const &  val)

◆ SetRight()

void PndSomNode::SetRight ( int  val)
inline

Definition at line 243 of file PndSomNode.h.

244 {
245  this->m_iRight = val;
246 };

◆ SetTop()

void PndSomNode::SetTop ( int  val)
inline

Definition at line 253 of file PndSomNode.h.

254 {
255  this->m_iTop = val;
256 };

◆ SetWeight()

void PndSomNode::SetWeight ( std::vector< float > const &  val)

Set weights for the current node.

Parameters
valThe vector containing the weight for the current node.

◆ SetXPos()

void PndSomNode::SetXPos ( double  xp)
inline

Definition at line 298 of file PndSomNode.h.

299 {
300  this->m_xPos = xp;
301 };

◆ SetYPos()

void PndSomNode::SetYPos ( double  yp)
inline

Definition at line 308 of file PndSomNode.h.

309 {
310  this->m_yPos = yp;
311 };

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