Direct Graphical Models  v.1.7.0
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(CGraphPairwise &graph) : CMessagePassing(graph) {}
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 }
Abstract base class for message passing inference algorithmes.
Tree-reweighted inference class.
Definition: InferTRW.h:19
void calculateMessage(Edge &edge, float *temp, float *data)
Definition: InferTRW.cpp:131
virtual void infer(unsigned int nIt=1)
Inference.
Definition: InferTRW.cpp:7
CInferTRW(CGraphPairwise &graph)
Constructor.
Definition: InferTRW.h:26
virtual void calculateMessages(unsigned int nIt)
Calculates messages, associated with the edges of corresponding graphical model.
Definition: InferTRW.cpp:51