opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST > Class Template Reference

A framework for message passing algorithms

Cf. F. R. Kschischang, B. J. Frey and H.-A. Loeliger, "Factor Graphs and the Sum-Product Algorithm", IEEE Transactions on Information Theory 47:498-519, 2001. More...

#include <messagepassing.hxx>

Inheritance diagram for opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >:
Inheritance graph
[legend]
Collaboration diagram for opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >:
Collaboration graph
[legend]

List of all members.

Classes

struct  Parameter

Public Types

typedef GM GraphicalModelType
typedef ACC Accumulation
typedef ACC AccumulatorType
typedef DIST Distance
typedef
UPDATE_RULES::FactorHullType 
FactorHullType
typedef
UPDATE_RULES::VariableHullType 
VariableHullType
typedef VerboseVisitor
< MessagePassing< GM, ACC,
UPDATE_RULES, DIST > > 
VerboseVisitorType
 Visitor.
typedef TimingVisitor
< MessagePassing< GM, ACC,
UPDATE_RULES, DIST > > 
TimingVisitorType
 Visitor.
typedef EmptyVisitor
< MessagePassing< GM, ACC,
UPDATE_RULES, DIST > > 
EmptyVisitorType
 Visitor.

Public Member Functions

 MessagePassing (const GraphicalModelType &, const Parameter &=Parameter())
std::string name () const
const GraphicalModelTypegraphicalModel () const
InferenceTermination marginal (const size_t, IndependentFactorType &out) const
 output a solution for a marginal for a specific variable
InferenceTermination factorMarginal (const size_t, IndependentFactorType &out) const
 output a solution for a marginal for all variables connected to a factor
ValueType convergenceXF () const
 cumulative distance between all pairs of messages from variables to factors (between the previous and the current interation)
ValueType convergenceFX () const
 cumulative distance between all pairs of messages from factors to variables (between the previous and the current interation)
ValueType convergence () const
 cumulative distance between all pairs of messages (between the previous and the current interation)
virtual void reset ()
InferenceTermination infer ()
template<class VisitorType >
InferenceTermination infer (VisitorType &)
void propagate (const ValueType &=0)
 invoke one iteration of message passing
InferenceTermination arg (std::vector< LabelType > &, const size_t=1) const
 output a solution

Public Attributes

 OPENGM_GM_TYPE_TYPEDEFS

Detailed Description

template<class GM, class ACC, class UPDATE_RULES, class DIST = opengm::MaxDistance>
class opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >

A framework for message passing algorithms

Cf. F. R. Kschischang, B. J. Frey and H.-A. Loeliger, "Factor Graphs and the Sum-Product Algorithm", IEEE Transactions on Information Theory 47:498-519, 2001.

Examples:

grid_potts.cxx, and markov-chain.cxx.

Definition at line 49 of file messagepassing.hxx.


Member Typedef Documentation

template<class GM, class ACC, class UPDATE_RULES, class DIST = opengm::MaxDistance>
typedef ACC opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >::Accumulation

Definition at line 52 of file messagepassing.hxx.

template<class GM, class ACC, class UPDATE_RULES, class DIST = opengm::MaxDistance>
typedef ACC opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >::AccumulatorType

Definition at line 53 of file messagepassing.hxx.

template<class GM, class ACC, class UPDATE_RULES, class DIST = opengm::MaxDistance>
typedef DIST opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >::Distance

Definition at line 55 of file messagepassing.hxx.

template<class GM, class ACC, class UPDATE_RULES, class DIST = opengm::MaxDistance>
typedef EmptyVisitor<MessagePassing<GM, ACC, UPDATE_RULES, DIST> > opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >::EmptyVisitorType

Visitor.

Definition at line 64 of file messagepassing.hxx.

template<class GM, class ACC, class UPDATE_RULES, class DIST = opengm::MaxDistance>
typedef UPDATE_RULES::FactorHullType opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >::FactorHullType

Definition at line 56 of file messagepassing.hxx.

template<class GM, class ACC, class UPDATE_RULES, class DIST = opengm::MaxDistance>
typedef GM opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >::GraphicalModelType

Reimplemented from opengm::Inference< GM, ACC >.

Definition at line 51 of file messagepassing.hxx.

template<class GM, class ACC, class UPDATE_RULES, class DIST = opengm::MaxDistance>
typedef TimingVisitor<MessagePassing<GM, ACC, UPDATE_RULES, DIST> > opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >::TimingVisitorType

Visitor.

Definition at line 62 of file messagepassing.hxx.

template<class GM, class ACC, class UPDATE_RULES, class DIST = opengm::MaxDistance>
typedef UPDATE_RULES::VariableHullType opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >::VariableHullType

Definition at line 57 of file messagepassing.hxx.

template<class GM, class ACC, class UPDATE_RULES, class DIST = opengm::MaxDistance>
typedef VerboseVisitor<MessagePassing<GM, ACC, UPDATE_RULES, DIST> > opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >::VerboseVisitorType

Visitor.

Definition at line 60 of file messagepassing.hxx.


Constructor & Destructor Documentation

template<class GM, class ACC, class UPDATE_RULES, class DIST = opengm::MaxDistance>
opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >::MessagePassing ( const GraphicalModelType ,
const Parameter = Parameter() 
)

Member Function Documentation

template<class GM , class ACC , class UPDATE_RULES , class DIST >
InferenceTermination opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >::arg ( std::vector< LabelType > &  arg,
const size_t  argIndex = 1 
) const [inline, virtual]

output a solution

Parameters:
[out] arg labeling
argIndex solution index (0=best, 1=second best, etc.)

Reimplemented from opengm::Inference< GM, ACC >.

Definition at line 580 of file messagepassing.hxx.

template<class GM , class ACC , class UPDATE_RULES , class DIST >
MessagePassing< GM, ACC, UPDATE_RULES, DIST >::ValueType opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >::convergence (  )  const [inline]

cumulative distance between all pairs of messages (between the previous and the current interation)

Definition at line 573 of file messagepassing.hxx.

Here is the call graph for this function:

template<class GM , class ACC , class UPDATE_RULES , class DIST >
MessagePassing< GM, ACC, UPDATE_RULES, DIST >::ValueType opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >::convergenceFX (  )  const [inline]

cumulative distance between all pairs of messages from factors to variables (between the previous and the current interation)

Definition at line 557 of file messagepassing.hxx.

template<class GM , class ACC , class UPDATE_RULES , class DIST >
MessagePassing< GM, ACC, UPDATE_RULES, DIST >::ValueType opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >::convergenceXF (  )  const [inline]

cumulative distance between all pairs of messages from variables to factors (between the previous and the current interation)

Definition at line 541 of file messagepassing.hxx.

Here is the caller graph for this function:

template<class GM , class ACC , class UPDATE_RULES , class DIST >
InferenceTermination opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >::factorMarginal ( const size_t  factorIndex,
IndependentFactorType out 
) const [inline, virtual]

output a solution for a marginal for all variables connected to a factor

Parameters:
factorIndex index of the factor
[out] out the marginal

Reimplemented from opengm::Inference< GM, ACC >.

Definition at line 527 of file messagepassing.hxx.

template<class GM , class ACC , class UPDATE_RULES , class DIST >
const MessagePassing< GM, ACC, UPDATE_RULES, DIST >::GraphicalModelType & opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >::graphicalModel (  )  const [inline, virtual]

Implements opengm::Inference< GM, ACC >.

Definition at line 205 of file messagepassing.hxx.

template<class GM , class ACC , class UPDATE_RULES , class DIST >
template<class VisitorType >
InferenceTermination opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >::infer ( VisitorType &  visitor  )  [inline]

Definition at line 220 of file messagepassing.hxx.

template<class GM , class ACC , class UPDATE_RULES , class DIST >
InferenceTermination opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >::infer (  )  [inline, virtual]

Implements opengm::Inference< GM, ACC >.

Definition at line 211 of file messagepassing.hxx.

template<class GM , class ACC , class UPDATE_RULES , class DIST >
InferenceTermination opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >::marginal ( const size_t  variableIndex,
IndependentFactorType out 
) const [inline, virtual]

output a solution for a marginal for a specific variable

Parameters:
variableIndex index of the variable
[out] out the marginal

Reimplemented from opengm::Inference< GM, ACC >.

Definition at line 515 of file messagepassing.hxx.

template<class GM , class ACC , class UPDATE_RULES , class DIST >
std::string opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >::name (  )  const [inline, virtual]

Implements opengm::Inference< GM, ACC >.

Definition at line 199 of file messagepassing.hxx.

template<class GM , class ACC , class UPDATE_RULES , class DIST >
void opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >::propagate ( const ValueType damping = 0  )  [inline]

invoke one iteration of message passing

Definition at line 358 of file messagepassing.hxx.

template<class GM , class ACC , class UPDATE_RULES , class DIST >
void opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >::reset (  )  [inline, virtual]

Definition at line 176 of file messagepassing.hxx.


Member Data Documentation

template<class GM, class ACC, class UPDATE_RULES, class DIST = opengm::MaxDistance>
opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >::OPENGM_GM_TYPE_TYPEDEFS

Definition at line 54 of file messagepassing.hxx.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Mon Jun 17 16:31:12 2013 for OpenGM by  doxygen 1.6.3