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>
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 GraphicalModelType & | graphicalModel () 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 |
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.
Definition at line 49 of file messagepassing.hxx.
typedef ACC opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >::Accumulation |
Definition at line 52 of file messagepassing.hxx.
typedef ACC opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >::AccumulatorType |
Definition at line 53 of file messagepassing.hxx.
typedef DIST opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >::Distance |
Definition at line 55 of file messagepassing.hxx.
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.
typedef UPDATE_RULES::FactorHullType opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >::FactorHullType |
Definition at line 56 of file messagepassing.hxx.
typedef GM opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >::GraphicalModelType |
Reimplemented from opengm::Inference< GM, ACC >.
Definition at line 51 of file messagepassing.hxx.
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.
typedef UPDATE_RULES::VariableHullType opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >::VariableHullType |
Definition at line 57 of file messagepassing.hxx.
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.
opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >::MessagePassing | ( | const GraphicalModelType & | , | |
const Parameter & | = Parameter() | |||
) |
InferenceTermination opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >::arg | ( | std::vector< LabelType > & | arg, | |
const size_t | argIndex = 1 | |||
) | const [inline, virtual] |
output a solution
[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.
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.
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.
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.
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
factorIndex | index of the factor | |
[out] | out | the marginal |
Reimplemented from opengm::Inference< GM, ACC >.
Definition at line 527 of file messagepassing.hxx.
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.
InferenceTermination opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >::infer | ( | VisitorType & | visitor | ) | [inline] |
Definition at line 220 of file messagepassing.hxx.
InferenceTermination opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >::infer | ( | ) | [inline, virtual] |
Implements opengm::Inference< GM, ACC >.
Definition at line 211 of file messagepassing.hxx.
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
variableIndex | index of the variable | |
[out] | out | the marginal |
Reimplemented from opengm::Inference< GM, ACC >.
Definition at line 515 of file messagepassing.hxx.
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.
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.
void opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >::reset | ( | ) | [inline, virtual] |
Definition at line 176 of file messagepassing.hxx.
opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >::OPENGM_GM_TYPE_TYPEDEFS |
Definition at line 54 of file messagepassing.hxx.