10 #define PND_SOM_NODE_H 18 #define PRINT_PND_SOM_NODE_DEBUG 0 37 explicit PndSomNode(std::vector<float>
const &weight);
44 PndSomNode(std::string
const &label, std::vector<float>
const &weight);
54 PndSomNode(
int lft,
int top,
int rgt,
int bot,
size_t WeightsDim = 0);
65 PndSomNode(
int lft,
int top,
int rgt,
int bot,
size_t WeightsDim, std::string
const &label);
76 PndSomNode(
int lft,
int top,
int rgt,
int bot, std::string
const &label, std::vector<float>
const &weight);
104 inline int GetTop()
const;
105 inline void SetTop(
int val);
119 inline std::string
const &
GetLabel()
const;
120 inline void SetLabel(std::string
const &val);
126 inline std::vector<float>
const &
GetWeight()
const;
132 void SetWeight(std::vector<float>
const &val);
138 void SetNeighbours(std::vector<std::pair<size_t, double>>
const &val);
144 inline std::vector<std::pair<size_t, double>>
const &
GetNeighbours()
const;
151 inline void SetXPos(
double xp);
154 inline void SetYPos(
double yp);
172 void SetLabelMap(std::map<std::string, size_t>
const &val);
173 std::map<std::string, size_t>
const &
GetLabelMap()
const;
178 #if (PRINT_PND_SOM_NODE_DEBUG > 0) 179 void PrintNode()
const;
186 void ClearInternalStructures();
192 void AdjustWeights(std::vector<double>
const &target,
double LearningRate,
double Influence);
212 std::vector<float> m_Weights;
218 std::vector<size_t> m_RespNodeIndex;
221 std::vector<std::pair<size_t, double>> m_NeighbourList;
224 std::map<std::string, size_t> m_labelCnts;
230 return this->m_iLeft;
240 return this->m_iRight;
245 this->m_iRight = val;
260 return this->m_iBottom;
265 this->m_iBottom = val;
270 return this->m_weightDim;
275 this->m_weightDim = val;
280 return this->m_label;
290 return this->m_Weights;
315 return this->m_NeighbourList;
317 #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