![]() |
Direct Graphical Models
v.1.7.0
|
Tree-reweighted inference class. More...
#include <InferTRW.h>
Public Member Functions | |
CInferTRW (CGraphPairwise &graph) | |
Constructor. More... | |
virtual | ~CInferTRW (void) |
virtual void | infer (unsigned int nIt=1) |
Inference. More... | |
![]() | |
CMessagePassing (CGraphPairwise &graph) | |
Constructor. More... | |
virtual | ~CMessagePassing (void) |
![]() | |
CInfer (CGraph &graph) | |
Constructor. More... | |
CInfer (const CInfer &)=delete | |
virtual | ~CInfer ()=default |
const CInfer & | operator= (const CInfer &)=delete |
vec_byte_t | decode (unsigned int nIt=0, Mat &lossMatrix=EmptyMat) |
Approximate decoding. More... | |
vec_float_t | getConfidence (void) const |
Returns the confidence of the perdiction. More... | |
vec_float_t | getPotentials (byte state) const |
Returns the potnetials for the selected state (class) More... | |
Protected Member Functions | |
virtual void | calculateMessages (unsigned int nIt) |
Calculates messages, associated with the edges of corresponding graphical model. More... | |
void | calculateMessage (Edge &edge, float *temp, float *data) |
![]() | |
CGraphPairwise & | getGraphPairwise (void) const |
Returns the graph. More... | |
void | calculateMessage (Edge *edge, float *temp, float *&dst, bool maxSum=false) |
Calculates one message for the specified edge edge. More... | |
void | createMessages (void) |
Allocates memory for Edge::msg and Edge::msg_temp containers for all edges in the graph. More... | |
void | deleteMessages (void) |
Deletes memory for Edge::msg and Edge::msg_temp containers for all edges in the graph. More... | |
void | swapMessages (void) |
Swaps Edge::msg and Edge::msg_temp for all edges in the graph. More... | |
![]() | |
CGraph & | getGraph (void) const |
Returns the reference to the graph. More... | |
Additional Inherited Members | |
![]() | |
static float | MatMul (const Mat &M, const float *v, float *&dst, bool maxSum=false) |
Specific matrix multiplication. More... | |
Tree-reweighted inference class.
This class is based on the Tree-reweighted message passing algorithm (a modification of a max-poduct LBP algorithm), described in the paper Convergent Tree-reweighted Message Passing for Energy Minimization
Definition at line 19 of file InferTRW.h.
|
inline |
|
inlinevirtual |
Definition at line 27 of file InferTRW.h.
|
protected |
Definition at line 131 of file InferTRW.cpp.
|
protectedvirtual |
Calculates messages, associated with the edges of corresponding graphical model.
This function may modify Edge::msg and Edge::msg_temp containers of graph edges
nIt | Number of iterations |
Implements DirectGraphicalModels::CMessagePassing.
Definition at line 51 of file InferTRW.cpp.
|
virtual |
Inference.
This function estimates the marginal potentials for each graph node, and stores them as node potentials
This function modifies Node::Pot containers of graph nodes
nIt | Number of iterations |
Reimplemented from DirectGraphicalModels::CMessagePassing.
Definition at line 7 of file InferTRW.cpp.