Inference algorithm interface. More...
#include <inference.hxx>
Public Types | |
typedef GM | GraphicalModelType |
typedef ACC | AccumulationType |
typedef GraphicalModelType::LabelType | LabelType |
typedef GraphicalModelType::IndexType | IndexType |
typedef GraphicalModelType::ValueType | ValueType |
typedef GraphicalModelType::OperatorType | OperatorType |
typedef GraphicalModelType::FactorType | FactorType |
typedef GraphicalModelType::IndependentFactorType | IndependentFactorType |
typedef GraphicalModelType::FunctionIdentifier | FunctionIdentifier |
Public Member Functions | |
virtual | ~Inference () |
virtual std::string | name () const =0 |
virtual const GraphicalModelType & | graphicalModel () const =0 |
virtual InferenceTermination | infer ()=0 |
virtual void | setStartingPoint (typename std::vector< LabelType >::const_iterator) |
set initial labeling | |
virtual InferenceTermination | arg (std::vector< LabelType > &, const size_t=1) const |
output a solution | |
virtual InferenceTermination | args (std::vector< std::vector< LabelType > > &) const |
virtual InferenceTermination | marginal (const size_t, IndependentFactorType &) const |
output a solution for a marginal for a specific variable | |
virtual InferenceTermination | factorMarginal (const size_t, IndependentFactorType &) const |
output a solution for a marginal for all variables connected to a factor | |
virtual ValueType | bound () const |
return a bound on the solution | |
virtual ValueType | value () const |
return the solution (value) | |
InferenceTermination | constrainedOptimum (std::vector< IndexType > &, std::vector< LabelType > &, std::vector< LabelType > &) const |
InferenceTermination | modeFromMarginal (std::vector< LabelType > &) const |
InferenceTermination | modeFromFactorMarginal (std::vector< LabelType > &) const |
Inference algorithm interface.
Definition at line 34 of file inference.hxx.
typedef ACC opengm::Inference< GM, ACC >::AccumulationType |
Reimplemented in opengm::AlphaBetaSwap< GM, INF >, opengm::AlphaExpansion< GM, INF >, opengm::AlphaExpansionFusion< GM, ACC >, opengm::AStar< GM, ACC >, opengm::Bruteforce< GM, ACC >, opengm::DualDecompositionSubGradient< GM, INF, DUALBLOCK >, opengm::DynamicProgramming< GM, ACC >, opengm::Gibbs< GM, ACC >, opengm::GraphCut< GM, ACC, MINSTCUT >, opengm::ICM< GM, ACC >, opengm::InfAndFlip< GM, ACC, INF >, opengm::LazyFlipper< GM, ACC >, opengm::LOC< GM, ACC >, opengm::LPCplex< GM, ACC >, opengm::MQPBO< GM, ACC >, opengm::Multicut< GM, ACC >, opengm::PartitionMove< GM, ACC >, opengm::QPBO< GM, MIN_ST_CUT >, opengm::ReducedInference< GM, ACC, INF >, opengm::SAT< GM >, opengm::SwendsenWang< GM, ACC >, opengm::ADSal< GM, ACC >, and opengm::TRWSi< GM, ACC >.
Definition at line 38 of file inference.hxx.
typedef GraphicalModelType::FactorType opengm::Inference< GM, ACC >::FactorType |
Reimplemented in opengm::Bruteforce< GM, ACC >, and opengm::SwendsenWang< GM, ACC >.
Definition at line 43 of file inference.hxx.
typedef GraphicalModelType::FunctionIdentifier opengm::Inference< GM, ACC >::FunctionIdentifier |
Reimplemented in opengm::Bruteforce< GM, ACC >, and opengm::SwendsenWang< GM, ACC >.
Definition at line 45 of file inference.hxx.
typedef GM opengm::Inference< GM, ACC >::GraphicalModelType |
Reimplemented in opengm::AlphaBetaSwap< GM, INF >, opengm::AlphaExpansion< GM, INF >, opengm::AlphaExpansionFusion< GM, ACC >, opengm::AStar< GM, ACC >, opengm::Bruteforce< GM, ACC >, opengm::DualDecompositionSubGradient< GM, INF, DUALBLOCK >, opengm::DynamicProgramming< GM, ACC >, opengm::Gibbs< GM, ACC >, opengm::GraphCut< GM, ACC, MINSTCUT >, opengm::ICM< GM, ACC >, opengm::InfAndFlip< GM, ACC, INF >, opengm::LazyFlipper< GM, ACC >, opengm::LOC< GM, ACC >, opengm::LPCplex< GM, ACC >, opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >, opengm::MQPBO< GM, ACC >, opengm::Multicut< GM, ACC >, opengm::PartitionMove< GM, ACC >, opengm::QPBO< GM, MIN_ST_CUT >, opengm::ReducedInference< GM, ACC, INF >, opengm::SAT< GM >, opengm::SwendsenWang< GM, ACC >, opengm::ADSal< GM, ACC >, and opengm::TRWSi< GM, ACC >.
Definition at line 37 of file inference.hxx.
typedef GraphicalModelType::IndependentFactorType opengm::Inference< GM, ACC >::IndependentFactorType |
Reimplemented in opengm::Bruteforce< GM, ACC >, and opengm::SwendsenWang< GM, ACC >.
Definition at line 44 of file inference.hxx.
typedef GraphicalModelType::IndexType opengm::Inference< GM, ACC >::IndexType |
Reimplemented in opengm::Bruteforce< GM, ACC >, and opengm::SwendsenWang< GM, ACC >.
Definition at line 40 of file inference.hxx.
typedef GraphicalModelType::LabelType opengm::Inference< GM, ACC >::LabelType |
Reimplemented in opengm::Bruteforce< GM, ACC >, and opengm::SwendsenWang< GM, ACC >.
Definition at line 39 of file inference.hxx.
typedef GraphicalModelType::OperatorType opengm::Inference< GM, ACC >::OperatorType |
Reimplemented in opengm::Bruteforce< GM, ACC >, and opengm::SwendsenWang< GM, ACC >.
Definition at line 42 of file inference.hxx.
typedef GraphicalModelType::ValueType opengm::Inference< GM, ACC >::ValueType |
Reimplemented in opengm::Bruteforce< GM, ACC >, and opengm::SwendsenWang< GM, ACC >.
Definition at line 41 of file inference.hxx.
virtual opengm::Inference< GM, ACC >::~Inference | ( | ) | [inline, virtual] |
Definition at line 47 of file inference.hxx.
InferenceTermination opengm::Inference< GM, ACC >::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 in opengm::AlphaBetaSwap< GM, INF >, opengm::AlphaExpansion< GM, INF >, opengm::AlphaExpansionFusion< GM, ACC >, opengm::AStar< GM, ACC >, opengm::Bruteforce< GM, ACC >, opengm::DualDecompositionSubGradient< GM, INF, DUALBLOCK >, opengm::DynamicProgramming< GM, ACC >, opengm::Gibbs< GM, ACC >, opengm::GraphCut< GM, ACC, MINSTCUT >, opengm::ICM< GM, ACC >, opengm::InfAndFlip< GM, ACC, INF >, opengm::LazyFlipper< GM, ACC >, opengm::LOC< GM, ACC >, opengm::LPCplex< GM, ACC >, opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >, opengm::MQPBO< GM, ACC >, opengm::Multicut< GM, ACC >, opengm::PartitionMove< GM, ACC >, opengm::ReducedInference< GM, ACC, INF >, opengm::SwendsenWang< GM, ACC >, opengm::ADSal< GM, ACC >, and opengm::TRWSi< GM, ACC >.
Definition at line 74 of file inference.hxx.
InferenceTermination opengm::Inference< GM, ACC >::args | ( | std::vector< std::vector< LabelType > > & | out | ) | const [inline, virtual] |
Reimplemented in opengm::AStar< GM, ACC >, and opengm::LPCplex< GM, ACC >.
Definition at line 93 of file inference.hxx.
GM::ValueType opengm::Inference< GM, ACC >::bound | ( | ) | const [inline, virtual] |
return a bound on the solution
Reimplemented in opengm::AStar< GM, ACC >, opengm::DualDecompositionSubGradient< GM, INF, DUALBLOCK >, opengm::InfAndFlip< GM, ACC, INF >, opengm::LPCplex< GM, ACC >, opengm::MQPBO< GM, ACC >, opengm::Multicut< GM, ACC >, opengm::ReducedInference< GM, ACC, INF >, opengm::ADSal< GM, ACC >, and opengm::TRWSi< GM, ACC >.
Definition at line 315 of file inference.hxx.
InferenceTermination opengm::Inference< GM, ACC >::constrainedOptimum | ( | std::vector< IndexType > & | variableIndices, | |
std::vector< LabelType > & | givenLabels, | |||
std::vector< LabelType > & | conf | |||
) | const [inline] |
Definition at line 128 of file inference.hxx.
InferenceTermination opengm::Inference< GM, ACC >::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 in opengm::AStar< GM, ACC >, and opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >.
Definition at line 118 of file inference.hxx.
virtual const GraphicalModelType& opengm::Inference< GM, ACC >::graphicalModel | ( | ) | const [pure virtual] |
Implemented in opengm::AlphaBetaSwap< GM, INF >, opengm::AlphaExpansion< GM, INF >, opengm::AlphaExpansionFusion< GM, ACC >, opengm::AStar< GM, ACC >, opengm::Bruteforce< GM, ACC >, opengm::DualDecompositionSubGradient< GM, INF, DUALBLOCK >, opengm::DynamicProgramming< GM, ACC >, opengm::Gibbs< GM, ACC >, opengm::GraphCut< GM, ACC, MINSTCUT >, opengm::ICM< GM, ACC >, opengm::InfAndFlip< GM, ACC, INF >, opengm::LazyFlipper< GM, ACC >, opengm::LOC< GM, ACC >, opengm::LPCplex< GM, ACC >, opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >, opengm::MQPBO< GM, ACC >, opengm::Multicut< GM, ACC >, opengm::PartitionMove< GM, ACC >, opengm::QPBO< GM, MIN_ST_CUT >, opengm::ReducedInference< GM, ACC, INF >, opengm::SAT< GM >, opengm::SwendsenWang< GM, ACC >, opengm::ADSal< GM, ACC >, and opengm::TRWSi< GM, ACC >.
virtual InferenceTermination opengm::Inference< GM, ACC >::infer | ( | ) | [pure virtual] |
Implemented in opengm::AlphaBetaSwap< GM, INF >, opengm::AlphaExpansion< GM, INF >, opengm::AlphaExpansionFusion< GM, ACC >, opengm::AStar< GM, ACC >, opengm::Bruteforce< GM, ACC >, opengm::DualDecompositionSubGradient< GM, INF, DUALBLOCK >, opengm::DynamicProgramming< GM, ACC >, opengm::Gibbs< GM, ACC >, opengm::GraphCut< GM, ACC, MINSTCUT >, opengm::ICM< GM, ACC >, opengm::InfAndFlip< GM, ACC, INF >, opengm::LazyFlipper< GM, ACC >, opengm::LOC< GM, ACC >, opengm::LPCplex< GM, ACC >, opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >, opengm::MQPBO< GM, ACC >, opengm::Multicut< GM, ACC >, opengm::PartitionMove< GM, ACC >, opengm::QPBO< GM, MIN_ST_CUT >, opengm::ReducedInference< GM, ACC, INF >, opengm::SAT< GM >, opengm::SwendsenWang< GM, ACC >, opengm::ADSal< GM, ACC >, and opengm::TRWSi< GM, ACC >.
InferenceTermination opengm::Inference< GM, ACC >::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 in opengm::AStar< GM, ACC >, and opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >.
Definition at line 105 of file inference.hxx.
InferenceTermination opengm::Inference< GM, ACC >::modeFromFactorMarginal | ( | std::vector< LabelType > & | conf | ) | const [inline] |
InferenceTermination opengm::Inference< GM, ACC >::modeFromMarginal | ( | std::vector< LabelType > & | conf | ) | const [inline] |
virtual std::string opengm::Inference< GM, ACC >::name | ( | ) | const [pure virtual] |
Implemented in opengm::AlphaBetaSwap< GM, INF >, opengm::AlphaExpansion< GM, INF >, opengm::AlphaExpansionFusion< GM, ACC >, opengm::AStar< GM, ACC >, opengm::Bruteforce< GM, ACC >, opengm::DualDecompositionSubGradient< GM, INF, DUALBLOCK >, opengm::DynamicProgramming< GM, ACC >, opengm::Gibbs< GM, ACC >, opengm::GraphCut< GM, ACC, MINSTCUT >, opengm::ICM< GM, ACC >, opengm::InfAndFlip< GM, ACC, INF >, opengm::LazyFlipper< GM, ACC >, opengm::LOC< GM, ACC >, opengm::LPCplex< GM, ACC >, opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >, opengm::MQPBO< GM, ACC >, opengm::Multicut< GM, ACC >, opengm::PartitionMove< GM, ACC >, opengm::QPBO< GM, MIN_ST_CUT >, opengm::ReducedInference< GM, ACC, INF >, opengm::SAT< GM >, opengm::SwendsenWang< GM, ACC >, opengm::ADSal< GM, ACC >, and opengm::TRWSi< GM, ACC >.
void opengm::Inference< GM, ACC >::setStartingPoint | ( | typename std::vector< LabelType >::const_iterator | begin | ) | [inline, virtual] |
set initial labeling
begin | iterator to the beginning of a sequence of labels |
Reimplemented in opengm::AlphaBetaSwap< GM, INF >, opengm::AlphaExpansion< GM, INF >, opengm::AlphaExpansionFusion< GM, ACC >, opengm::Gibbs< GM, ACC >, opengm::ICM< GM, ACC >, opengm::LazyFlipper< GM, ACC >, opengm::LOC< GM, ACC >, and opengm::MQPBO< GM, ACC >.
Definition at line 86 of file inference.hxx.
GM::ValueType opengm::Inference< GM, ACC >::value | ( | ) | const [inline, virtual] |
return the solution (value)
Reimplemented in opengm::Bruteforce< GM, ACC >, opengm::DualDecompositionSubGradient< GM, INF, DUALBLOCK >, opengm::InfAndFlip< GM, ACC, INF >, opengm::LazyFlipper< GM, ACC >, opengm::LOC< GM, ACC >, opengm::LPCplex< GM, ACC >, opengm::MQPBO< GM, ACC >, opengm::Multicut< GM, ACC >, opengm::ReducedInference< GM, ACC, INF >, opengm::SAT< GM >, opengm::ADSal< GM, ACC >, and opengm::TRWSi< GM, ACC >.
Definition at line 293 of file inference.hxx.