1 #include "InferChain.h" 2 #include "GraphPairwise.h" 12 size_t nToEdges = node->to.size();
13 for (
size_t e_t = 0; e_t < nToEdges; e_t++) {
15 if (edge_to->
node2 == node->id + 1)
22 size_t nToEdges = node->to.size();
23 for (
size_t e_t = 0; e_t < nToEdges; e_t++) {
25 if (edge_to->
node2 == node->id - 1)
size_t node2
Second (destination) node in edge.
float * msg
Message (used in message-passing algorithms): Mat(size: nStates x 1; type: CV_32FC1) ...
virtual size_t getNumNodes(void) const =0
Returns the number of nodes in the graph.
CGraph & getGraph(void) const
Returns the reference to the graph.
std::unique_ptr< Node > ptr_node_t
CGraphPairwise & getGraphPairwise(void) const
Returns the graph.
virtual void calculateMessages(unsigned int nIt)
Calculates messages for exact inference in a chain graph.
void calculateMessage(Edge *edge, float *temp, float *&dst, bool maxSum=false)
Calculates one message for the specified edge edge.