21 #ifndef PND_SOM_NODE_H 22 #define PND_SOM_NODE_H 30 #define PRINT_PND_SOM_NODE_DEBUG 0 49 explicit PndSomNode(std::vector<float>
const &weight);
56 PndSomNode(std::string
const &label, std::vector<float>
const &weight);
66 PndSomNode(
int lft,
int top,
int rgt,
int bot,
size_t WeightsDim = 0);
77 PndSomNode(
int lft,
int top,
int rgt,
int bot,
size_t WeightsDim, std::string
const &label);
88 PndSomNode(
int lft,
int top,
int rgt,
int bot, std::string
const &label, std::vector<float>
const &weight);
116 inline int GetTop()
const;
117 inline void SetTop(
int val);
131 inline std::string
const &
GetLabel()
const;
132 inline void SetLabel(std::string
const &val);
138 inline std::vector<float>
const &
GetWeight()
const;
144 void SetWeight(std::vector<float>
const &val);
150 void SetNeighbours(std::vector<std::pair<size_t, double>>
const &val);
156 inline std::vector<std::pair<size_t, double>>
const &
GetNeighbours()
const;
163 inline void SetXPos(
double xp);
166 inline void SetYPos(
double yp);
184 void SetLabelMap(std::map<std::string, size_t>
const &val);
185 std::map<std::string, size_t>
const &
GetLabelMap()
const;
190 #if (PRINT_PND_SOM_NODE_DEBUG > 0) 191 void PrintNode()
const;
198 void ClearInternalStructures();
204 void AdjustWeights(std::vector<double>
const &target,
double LearningRate,
double Influence);
224 std::vector<float> m_Weights;
230 std::vector<size_t> m_RespNodeIndex;
233 std::vector<std::pair<size_t, double>> m_NeighbourList;
236 std::map<std::string, size_t> m_labelCnts;
242 return this->m_iLeft;
252 return this->m_iRight;
257 this->m_iRight = val;
272 return this->m_iBottom;
277 this->m_iBottom = val;
282 return this->m_weightDim;
287 this->m_weightDim = val;
292 return this->m_label;
302 return this->m_Weights;
327 return this->m_NeighbourList;
329 #endif // End of interface
void AddToRespList(size_t idx)
PndSomNode & operator=(PndSomNode const &oth)
void SetLabelMap(std::map< std::string, size_t > const &val)
std::string const & GetLabel() const
void SetWeight(std::vector< float > const &val)
void SetRespList(std::vector< size_t > const &val)
void SetNeighbours(std::vector< std::pair< size_t, double >> const &val)
std::vector< float > const & GetWeight() const
void SetLabel(std::string const &val)
size_t GetNodeDimension() const
std::vector< std::pair< size_t, double > > const & GetNeighbours() const
std::map< std::string, size_t > const & GetLabelMap() const
void SetNodeDimension(size_t val)
std::vector< size_t > const & GetRespoList() const