6 #include "GraphPairwise.h" 28 DllExport
virtual void infer(
unsigned int nIt = 1);
75 static float MatMul(
const Mat &M,
const float *v,
float *&dst,
bool maxSum =
false);
void swapMessages(void)
Swaps Edge::msg and Edge::msg_temp for all edges in the graph.
Abstract base class for message passing inference algorithmes.
virtual void calculateMessages(unsigned int nIt)=0
Calculates messages, associated with the edges of corresponding graphical model.
CGraph & getGraph(void) const
Returns the reference to the graph.
static float MatMul(const Mat &M, const float *v, float *&dst, bool maxSum=false)
Specific matrix multiplication.
Base abstract class for random model inference.
virtual ~CMessagePassing(void)
CGraphPairwise & getGraphPairwise(void) const
Returns the graph.
void deleteMessages(void)
Deletes memory for Edge::msg and Edge::msg_temp containers for all edges in the graph.
CMessagePassing(CGraphPairwise &graph)
Constructor.
void createMessages(void)
Allocates memory for Edge::msg and Edge::msg_temp containers for all edges in the graph...
virtual void infer(unsigned int nIt=1)
Inference.
void calculateMessage(Edge *edge, float *temp, float *&dst, bool maxSum=false)
Calculates one message for the specified edge edge.