OpenGM  2.3.x
Discrete Graphical Model Library
Public Types | Public Member Functions | List of all members
opengm::Inference< GM, ACC > Class Template Referenceabstract

Inference algorithm interface. More...

#include <inference.hxx>

+ Inheritance diagram for opengm::Inference< GM, ACC >:
+ Collaboration diagram for opengm::Inference< GM, ACC >:

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 GraphicalModelTypegraphicalModel () const =0
 
virtual InferenceTermination infer ()=0
 
virtual void setStartingPoint (typename std::vector< LabelType >::const_iterator)
 set initial labeling More...
 
virtual InferenceTermination arg (std::vector< LabelType > &, const size_t=1) const
 output a solution More...
 
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 More...
 
virtual InferenceTermination factorMarginal (const size_t, IndependentFactorType &) const
 output a solution for a marginal for all variables connected to a factor More...
 
virtual ValueType bound () const
 return a bound on the solution More...
 
virtual ValueType value () const
 return the solution (value) More...
 
InferenceTermination constrainedOptimum (std::vector< IndexType > &, std::vector< LabelType > &, std::vector< LabelType > &) const
 
InferenceTermination modeFromMarginal (std::vector< LabelType > &) const
 
InferenceTermination modeFromFactorMarginal (std::vector< LabelType > &) const
 

Detailed Description

template<class GM, class ACC>
class opengm::Inference< GM, ACC >

Inference algorithm interface.

Definition at line 34 of file inference.hxx.

Member Typedef Documentation

template<class GM, class ACC>
typedef ACC opengm::Inference< GM, ACC >::AccumulationType

Definition at line 38 of file inference.hxx.

template<class GM, class ACC>
typedef GraphicalModelType::FactorType opengm::Inference< GM, ACC >::FactorType

Definition at line 43 of file inference.hxx.

template<class GM, class ACC>
typedef GraphicalModelType::FunctionIdentifier opengm::Inference< GM, ACC >::FunctionIdentifier

Definition at line 45 of file inference.hxx.

template<class GM, class ACC>
typedef GM opengm::Inference< GM, ACC >::GraphicalModelType

Definition at line 37 of file inference.hxx.

template<class GM, class ACC>
typedef GraphicalModelType::IndependentFactorType opengm::Inference< GM, ACC >::IndependentFactorType

Definition at line 44 of file inference.hxx.

template<class GM, class ACC>
typedef GraphicalModelType::IndexType opengm::Inference< GM, ACC >::IndexType

Definition at line 40 of file inference.hxx.

template<class GM, class ACC>
typedef GraphicalModelType::LabelType opengm::Inference< GM, ACC >::LabelType

Definition at line 39 of file inference.hxx.

template<class GM, class ACC>
typedef GraphicalModelType::OperatorType opengm::Inference< GM, ACC >::OperatorType

Definition at line 42 of file inference.hxx.

template<class GM, class ACC>
typedef GraphicalModelType::ValueType opengm::Inference< GM, ACC >::ValueType

Definition at line 41 of file inference.hxx.

Constructor & Destructor Documentation

template<class GM, class ACC>
virtual opengm::Inference< GM, ACC >::~Inference ( )
inlinevirtual

Definition at line 47 of file inference.hxx.

Member Function Documentation

template<class GM , class ACC >
InferenceTermination opengm::Inference< GM, ACC >::arg ( std::vector< LabelType > &  arg,
const size_t  argIndex = 1 
) const
inlinevirtual

output a solution

Parameters
[out]arglabeling
argIndexsolution index (1=best, 2=second best, etc.)

Reimplemented in opengm::IntersectionBasedInf< GM, PROPOSAL_GEN >, opengm::FusionBasedInf< GM, PROPOSAL_GEN >, opengm::trws_base::SmoothingBasedInference< GM, ACC >, opengm::CombiLP< GM, ACC, LPSOLVER >, opengm::SelfFusion< INFERENCE >, opengm::CGC< GM, ACC >, opengm::LazyFlipper< GM, ACC >, opengm::LPCplex< GM, ACC >, opengm::Multicut< GM, ACC >, opengm::LPGurobi< GM, ACC >, opengm::SwendsenWang< GM, ACC >, opengm::Gibbs< GM, ACC >, opengm::LOC< GM, ACC >, opengm::TRWSi< GM, ACC >, opengm::AStar< GM, ACC >, opengm::LSA_TR< GM, ACC >, opengm::external::libdai::LoopCorrectedBp< GM, ACC, CAVITY_INFERENCE >, opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >, opengm::ReducedInference< GM, ACC, INF >, opengm::external::libdai::DecMap< SUB_INFERENCE >, opengm::external::libdai::TreeReweightedBp< GM, ACC >, opengm::external::libdai::MeanField< GM, ACC >, opengm::external::libdai::TreeExpectationPropagation< GM, ACC >, opengm::LPInferenceBase< LP_INFERENCE_TYPE >, opengm::LPInferenceBase< LPGurobi2< GM_TYPE, ACC_TYPE > >, opengm::LPInferenceBase< LPCplex2< GM_TYPE, ACC_TYPE > >, opengm::ICM< GM, ACC >, opengm::MQPBO< GM, ACC >, opengm::DualDecompositionSubGradient< GM, INF, DUALBLOCK >, opengm::PartitionMove< GM, ACC >, opengm::AlphaExpansionFusion< GM, ACC >, opengm::AlphaExpansion< GM, INF >, opengm::DMC< GM, INF >, opengm::InfAndFlip< GM, ACC, INF >, opengm::GreedyGremlin< GM, ACC >, opengm::GraphCut< GM, ACC, MINSTCUT >, opengm::AlphaBetaSwap< GM, INF >, opengm::DynamicProgramming< GM, ACC >, and opengm::Bruteforce< GM, ACC >.

Definition at line 74 of file inference.hxx.

template<class GM , class ACC >
InferenceTermination opengm::Inference< GM, ACC >::args ( std::vector< std::vector< LabelType > > &  out) const
inlinevirtual
template<class GM , class ACC >
GM::ValueType opengm::Inference< GM, ACC >::bound ( ) const
virtual
template<class GM , class ACC >
InferenceTermination opengm::Inference< GM, ACC >::constrainedOptimum ( std::vector< IndexType > &  variableIndices,
std::vector< LabelType > &  givenLabels,
std::vector< LabelType > &  conf 
) const

Definition at line 129 of file inference.hxx.

template<class GM , class ACC >
InferenceTermination opengm::Inference< GM, ACC >::factorMarginal ( const size_t  factorIndex,
IndependentFactorType out 
) const
inlinevirtual
template<class GM, class ACC>
virtual const GraphicalModelType& opengm::Inference< GM, ACC >::graphicalModel ( ) const
pure virtual

Implemented in opengm::IntersectionBasedInf< GM, PROPOSAL_GEN >, opengm::FusionBasedInf< GM, PROPOSAL_GEN >, opengm::trws_base::SmoothingBasedInference< GM, ACC >, opengm::CombiLP< GM, ACC, LPSOLVER >, opengm::SelfFusion< INFERENCE >, opengm::CGC< GM, ACC >, opengm::LazyFlipper< GM, ACC >, opengm::Multicut< GM, ACC >, opengm::LPCplex< GM, ACC >, opengm::LPGurobi< GM, ACC >, opengm::SwendsenWang< GM, ACC >, opengm::Gibbs< GM, ACC >, opengm::LOC< GM, ACC >, opengm::external::MPLP< GM >, opengm::TRWSi< GM, ACC >, opengm::LSA_TR< GM, ACC >, opengm::AStar< GM, ACC >, opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >, opengm::ReducedInference< GM, ACC, INF >, opengm::external::libdai::LoopCorrectedBp< GM, ACC, CAVITY_INFERENCE >, opengm::external::libdai::DecMap< SUB_INFERENCE >, opengm::external::libdai::TreeReweightedBp< GM, ACC >, opengm::external::libdai::MeanField< GM, ACC >, opengm::LPInferenceBase< LP_INFERENCE_TYPE >, opengm::LPInferenceBase< LPGurobi2< GM_TYPE, ACC_TYPE > >, opengm::LPInferenceBase< LPCplex2< GM_TYPE, ACC_TYPE > >, opengm::external::TRWS< GM >, opengm::external::DAOOPT< GM >, opengm::external::libdai::TreeExpectationPropagation< GM, ACC >, opengm::external::GRANTE< GM >, opengm::external::AD3Inf< GM, ACC >, opengm::external::MRFLIB< GM >, opengm::ICM< GM, ACC >, opengm::external::GCOLIB< GM >, opengm::MQPBO< GM, ACC >, opengm::PartitionMove< GM, ACC >, opengm::DualDecompositionSubGradient< GM, INF, DUALBLOCK >, opengm::external::SRMP< GM >, opengm::external::QPBO< GM >, opengm::AlphaExpansionFusion< GM, ACC >, opengm::AlphaExpansion< GM, INF >, opengm::DMC< GM, INF >, opengm::external::FastPD< GM >, opengm::GreedyGremlin< GM, ACC >, opengm::InfAndFlip< GM, ACC, INF >, opengm::GraphCut< GM, ACC, MINSTCUT >, opengm::AlphaBetaSwap< GM, INF >, opengm::HQPBO< GM, ACC >, opengm::DynamicProgramming< GM, ACC >, opengm::SAT< GM >, opengm::QPBO< GM, MIN_ST_CUT >, and opengm::Bruteforce< GM, ACC >.

template<class GM, class ACC>
virtual InferenceTermination opengm::Inference< GM, ACC >::infer ( )
pure virtual

Implemented in opengm::IntersectionBasedInf< GM, PROPOSAL_GEN >, opengm::FusionBasedInf< GM, PROPOSAL_GEN >, opengm::CombiLP< GM, ACC, LPSOLVER >, opengm::SelfFusion< INFERENCE >, opengm::CGC< GM, ACC >, opengm::LazyFlipper< GM, ACC >, opengm::NesterovAcceleratedGradient< GM, ACC >, opengm::Multicut< GM, ACC >, opengm::LPCplex< GM, ACC >, opengm::LPGurobi< GM, ACC >, opengm::SwendsenWang< GM, ACC >, opengm::Gibbs< GM, ACC >, opengm::LOC< GM, ACC >, opengm::external::MPLP< GM >, opengm::ADSal< GM, ACC >, opengm::TRWSi< GM, ACC >, opengm::LSA_TR< GM, ACC >, opengm::AStar< GM, ACC >, opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >, opengm::external::libdai::LoopCorrectedBp< GM, ACC, CAVITY_INFERENCE >, opengm::ReducedInference< GM, ACC, INF >, opengm::external::libdai::DecMap< SUB_INFERENCE >, opengm::external::libdai::TreeReweightedBp< GM, ACC >, opengm::external::libdai::MeanField< GM, ACC >, opengm::external::TRWS< GM >, opengm::LPInferenceBase< LP_INFERENCE_TYPE >, opengm::LPInferenceBase< LPGurobi2< GM_TYPE, ACC_TYPE > >, opengm::LPInferenceBase< LPCplex2< GM_TYPE, ACC_TYPE > >, opengm::external::libdai::TreeExpectationPropagation< GM, ACC >, opengm::external::DAOOPT< GM >, opengm::external::GRANTE< GM >, opengm::external::AD3Inf< GM, ACC >, opengm::external::MRFLIB< GM >, opengm::ICM< GM, ACC >, opengm::external::GCOLIB< GM >, opengm::MQPBO< GM, ACC >, opengm::PartitionMove< GM, ACC >, opengm::DualDecompositionSubGradient< GM, INF, DUALBLOCK >, opengm::external::SRMP< GM >, opengm::external::QPBO< GM >, opengm::AlphaExpansionFusion< GM, ACC >, opengm::AlphaExpansion< GM, INF >, opengm::external::FastPD< GM >, opengm::InfAndFlip< GM, ACC, INF >, opengm::DMC< GM, INF >, opengm::GreedyGremlin< GM, ACC >, opengm::GraphCut< GM, ACC, MINSTCUT >, opengm::AlphaBetaSwap< GM, INF >, opengm::HQPBO< GM, ACC >, opengm::DynamicProgramming< GM, ACC >, opengm::SAT< GM >, opengm::QPBO< GM, MIN_ST_CUT >, and opengm::Bruteforce< GM, ACC >.

template<class GM , class ACC >
InferenceTermination opengm::Inference< GM, ACC >::marginal ( const size_t  variableIndex,
IndependentFactorType out 
) const
inlinevirtual
template<class GM , class ACC >
InferenceTermination opengm::Inference< GM, ACC >::modeFromFactorMarginal ( std::vector< LabelType > &  conf) const

Definition at line 350 of file inference.hxx.

template<class GM , class ACC >
InferenceTermination opengm::Inference< GM, ACC >::modeFromMarginal ( std::vector< LabelType > &  conf) const

Definition at line 321 of file inference.hxx.

template<class GM, class ACC>
virtual std::string opengm::Inference< GM, ACC >::name ( ) const
pure virtual

Implemented in opengm::IntersectionBasedInf< GM, PROPOSAL_GEN >, opengm::FusionBasedInf< GM, PROPOSAL_GEN >, opengm::CombiLP< GM, ACC, LPSOLVER >, opengm::SelfFusion< INFERENCE >, opengm::CGC< GM, ACC >, opengm::NesterovAcceleratedGradient< GM, ACC >, opengm::LazyFlipper< GM, ACC >, opengm::Multicut< GM, ACC >, opengm::LPCplex< GM, ACC >, opengm::LPGurobi< GM, ACC >, opengm::SwendsenWang< GM, ACC >, opengm::Gibbs< GM, ACC >, opengm::LOC< GM, ACC >, opengm::ADSal< GM, ACC >, opengm::external::MPLP< GM >, opengm::TRWSi< GM, ACC >, opengm::LSA_TR< GM, ACC >, opengm::AStar< GM, ACC >, opengm::MessagePassing< GM, ACC, UPDATE_RULES, DIST >, opengm::ReducedInference< GM, ACC, INF >, opengm::external::TRWS< GM >, opengm::external::DAOOPT< GM >, opengm::external::GRANTE< GM >, opengm::external::AD3Inf< GM, ACC >, opengm::external::MRFLIB< GM >, opengm::ICM< GM, ACC >, opengm::external::GCOLIB< GM >, opengm::MQPBO< GM, ACC >, opengm::PartitionMove< GM, ACC >, opengm::DualDecompositionSubGradient< GM, INF, DUALBLOCK >, opengm::external::SRMP< GM >, opengm::external::QPBO< GM >, opengm::AlphaExpansionFusion< GM, ACC >, opengm::AlphaExpansion< GM, INF >, opengm::DMC< GM, INF >, opengm::external::FastPD< GM >, opengm::GreedyGremlin< GM, ACC >, opengm::InfAndFlip< GM, ACC, INF >, opengm::external::libdai::MeanField< GM, ACC >, opengm::external::libdai::TreeReweightedBp< GM, ACC >, opengm::GraphCut< GM, ACC, MINSTCUT >, opengm::external::libdai::LoopCorrectedBp< GM, ACC, CAVITY_INFERENCE >, opengm::AlphaBetaSwap< GM, INF >, opengm::external::libdai::TreeExpectationPropagation< GM, ACC >, opengm::HQPBO< GM, ACC >, opengm::DynamicProgramming< GM, ACC >, opengm::SAT< GM >, opengm::QPBO< GM, MIN_ST_CUT >, opengm::external::libdai::DecMap< SUB_INFERENCE >, opengm::Bruteforce< GM, ACC >, opengm::LPCplex2< GM_TYPE, ACC_TYPE >, and opengm::LPGurobi2< GM_TYPE, ACC_TYPE >.

template<class GM , class ACC >
void opengm::Inference< GM, ACC >::setStartingPoint ( typename std::vector< LabelType >::const_iterator  begin)
inlinevirtual
template<class GM , class ACC >
GM::ValueType opengm::Inference< GM, ACC >::value ( ) const
virtual