Direct Graphical Models  v.1.5.2
InferTRW.h
1 // Tree-reweighted inference class interface
2 // Written by Sergey G. Kosov in 2016 for Project X
3 #pragma once
4 
5 #include "MessagePassing.h"
6 
7 namespace DirectGraphicalModels
8 {
9  struct Edge;
10 
11  // ==================== Microsoft TRW Decode Class ==================
19  class CInferTRW : public CMessagePassing
20  {
21  public:
26  DllExport CInferTRW(CGraph *pGraph) : CMessagePassing(pGraph) {}
27  DllExport virtual ~CInferTRW(void) {}
28 
29  DllExport virtual void infer(unsigned int nIt = 1);
30 
31 
32  protected:
33  DllExport virtual void calculateMessages(unsigned int nIt);
34  void calculateMessage(Edge &edge, float *temp, float *data);
35 
36  };
37 }
Pairwise graph class.
Definition: Graph.h:72
Edge structure
Definition: Graph.h:37
virtual void infer(unsigned int nIt=1)
Inference.
Definition: InferTRW.cpp:7
void calculateMessage(Edge &edge, float *temp, float *data)
Definition: InferTRW.cpp:132
virtual void calculateMessages(unsigned int nIt)
Calculates messages, associated with the edges of corresponding graphical model.
Definition: InferTRW.cpp:51
Abstract base class for message passing inference algorithmes.
CInferTRW(CGraph *pGraph)
Constructor.
Definition: InferTRW.h:26
Tree-reweighted inference class.
Definition: InferTRW.h:19