OpenGM  2.3.x
Discrete Graphical Model Library
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
opengm::InfAndFlip< GM, ACC, INF > Class Template Reference

Inference and Flip

. More...

#include <infandflip.hxx>

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

Classes

struct  Parameter
 

Public Types

typedef ACC AccumulationType
 
typedef GM GraphicalModelType
 
typedef visitors::VerboseVisitor< InfAndFlip< GM, ACC, INF > > VerboseVisitorType
 
typedef visitors::EmptyVisitor< InfAndFlip< GM, ACC, INF > > EmptyVisitorType
 
typedef visitors::TimingVisitor< InfAndFlip< GM, ACC, INF > > TimingVisitorType
 
- Public Types inherited from opengm::Inference< GM, ACC >
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

 InfAndFlip (const GraphicalModelType &, typename InfAndFlip::Parameter param)
 
std::string name () const
 
const GraphicalModelTypegraphicalModel () const
 
ValueType value () const
 return the solution (value) More...
 
ValueType bound () const
 return a bound on the solution More...
 
void reset ()
 
InferenceTermination infer ()
 start the algorithm More...
 
template<class VisitorType >
InferenceTermination infer (VisitorType &)
 start the algorithm More...
 
InferenceTermination arg (std::vector< LabelType > &, const size_t=1) const
 output a solution More...
 
void setStartingPoint (typename std::vector< LabelType >::const_iterator sp)
 set initial labeling More...
 
- Public Member Functions inherited from opengm::Inference< GM, ACC >
virtual ~Inference ()
 
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...
 
InferenceTermination constrainedOptimum (std::vector< IndexType > &, std::vector< LabelType > &, std::vector< LabelType > &) const
 
InferenceTermination modeFromMarginal (std::vector< LabelType > &) const
 
InferenceTermination modeFromFactorMarginal (std::vector< LabelType > &) const
 

Public Attributes

 OPENGM_GM_TYPE_TYPEDEFS
 

Detailed Description

template<class GM, class ACC, class INF>
class opengm::InfAndFlip< GM, ACC, INF >

Inference and Flip

.

Definition at line 27 of file infandflip.hxx.

Member Typedef Documentation

template<class GM, class ACC, class INF>
typedef ACC opengm::InfAndFlip< GM, ACC, INF >::AccumulationType

Definition at line 29 of file infandflip.hxx.

template<class GM, class ACC, class INF>
typedef visitors::EmptyVisitor<InfAndFlip<GM, ACC, INF> > opengm::InfAndFlip< GM, ACC, INF >::EmptyVisitorType

Definition at line 33 of file infandflip.hxx.

template<class GM, class ACC, class INF>
typedef GM opengm::InfAndFlip< GM, ACC, INF >::GraphicalModelType

Definition at line 30 of file infandflip.hxx.

template<class GM, class ACC, class INF>
typedef visitors::TimingVisitor<InfAndFlip<GM, ACC, INF> > opengm::InfAndFlip< GM, ACC, INF >::TimingVisitorType

Definition at line 34 of file infandflip.hxx.

template<class GM, class ACC, class INF>
typedef visitors::VerboseVisitor<InfAndFlip<GM, ACC, INF> > opengm::InfAndFlip< GM, ACC, INF >::VerboseVisitorType

Definition at line 32 of file infandflip.hxx.

Constructor & Destructor Documentation

template<class GM, class ACC, class INF>
opengm::InfAndFlip< GM, ACC, INF >::InfAndFlip ( const GraphicalModelType ,
typename InfAndFlip< GM, ACC, INF >::Parameter  param 
)
inline

Definition at line 82 of file infandflip.hxx.

Member Function Documentation

template<class GM , class ACC , class INF >
InferenceTermination opengm::InfAndFlip< GM, ACC, INF >::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 from opengm::Inference< GM, ACC >.

Definition at line 173 of file infandflip.hxx.

template<class GM , class ACC , class INF >
InfAndFlip< GM, ACC, INF >::ValueType opengm::InfAndFlip< GM, ACC, INF >::bound ( ) const
inlinevirtual

return a bound on the solution

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

Definition at line 198 of file infandflip.hxx.

template<class GM , class ACC , class INF >
const InfAndFlip< GM, ACC, INF >::GraphicalModelType & opengm::InfAndFlip< GM, ACC, INF >::graphicalModel ( ) const
inlinevirtual

Implements opengm::Inference< GM, ACC >.

Definition at line 110 of file infandflip.hxx.

template<class GM , class ACC , class INF >
InferenceTermination opengm::InfAndFlip< GM, ACC, INF >::infer ( )
inlinevirtual

start the algorithm

Implements opengm::Inference< GM, ACC >.

Definition at line 164 of file infandflip.hxx.

template<class GM , class ACC , class INF >
template<class VisitorType >
InferenceTermination opengm::InfAndFlip< GM, ACC, INF >::infer ( VisitorType &  visitor)
inline

start the algorithm

Definition at line 120 of file infandflip.hxx.

+ Here is the call graph for this function:

template<class GM , class ACC , class INF >
std::string opengm::InfAndFlip< GM, ACC, INF >::name ( ) const
inlinevirtual

Implements opengm::Inference< GM, ACC >.

Definition at line 103 of file infandflip.hxx.

template<class GM , class ACC , class INF >
void opengm::InfAndFlip< GM, ACC, INF >::reset ( )
inline

Definition at line 97 of file infandflip.hxx.

template<class GM, class ACC, class INF>
void opengm::InfAndFlip< GM, ACC, INF >::setStartingPoint ( typename std::vector< LabelType >::const_iterator  begin)
inlinevirtual

set initial labeling

Parameters
beginiterator to the beginning of a sequence of labels

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

Definition at line 60 of file infandflip.hxx.

template<class GM , class ACC , class INF >
InfAndFlip< GM, ACC, INF >::ValueType opengm::InfAndFlip< GM, ACC, INF >::value ( ) const
inlinevirtual

return the solution (value)

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

Definition at line 192 of file infandflip.hxx.

Member Data Documentation

template<class GM, class ACC, class INF>
opengm::InfAndFlip< GM, ACC, INF >::OPENGM_GM_TYPE_TYPEDEFS

Definition at line 31 of file infandflip.hxx.