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

271 {
272  return this->m_iBottom;
273 };

◆ GetLabel()

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

Modify node label (class name)

Definition at line 290 of file PndSomNode.h.

291 {
292  return this->m_label;
293 };

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

241 {
242  return this->m_iLeft;
243 };

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

326 {
327  return this->m_NeighbourList;
328 };

◆ GetNodeDimension()

size_t PndSomNode::GetNodeDimension ( ) const
inline

Modify node weight dimension

Definition at line 280 of file PndSomNode.h.

281 {
282  return this->m_weightDim;
283 };

◆ GetRespoList()

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

◆ GetRight()

int PndSomNode::GetRight ( ) const
inline

Definition at line 250 of file PndSomNode.h.

251 {
252  return this->m_iRight;
253 };

◆ GetTop()

int PndSomNode::GetTop ( ) const
inline

Definition at line 260 of file PndSomNode.h.

261 {
262  return this->m_iTop;
263 };

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

301 {
302  return this->m_Weights;
303 };

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

306 {
307  return this->m_xPos;
308 };

◆ GetYPos()

double PndSomNode::GetYPos ( ) const
inline

Definition at line 315 of file PndSomNode.h.

316 {
317  return this->m_yPos;
318 };

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

276 {
277  this->m_iBottom = val;
278 };

◆ SetLabel()

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

Definition at line 295 of file PndSomNode.h.

296 {
297  this->m_label = val;
298 };

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

246 {
247  this->m_iLeft = val;
248 };

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

286 {
287  this->m_weightDim = val;
288 };

◆ SetRespList()

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

◆ SetRight()

void PndSomNode::SetRight ( int  val)
inline

Definition at line 255 of file PndSomNode.h.

256 {
257  this->m_iRight = val;
258 };

◆ SetTop()

void PndSomNode::SetTop ( int  val)
inline

Definition at line 265 of file PndSomNode.h.

266 {
267  this->m_iTop = val;
268 };

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

311 {
312  this->m_xPos = xp;
313 };

◆ SetYPos()

void PndSomNode::SetYPos ( double  yp)
inline

Definition at line 320 of file PndSomNode.h.

321 {
322  this->m_yPos = yp;
323 };

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