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

Alpha-Beta-Swap Algorithm. More...

#include <alphabetaswap.hxx>

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

Classes

struct  Parameter
 

Public Types

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

 AlphaBetaSwap (const GraphicalModelType &, Parameter=Parameter())
 
std::string name () const
 
const GraphicalModelTypegraphicalModel () const
 
InferenceTermination infer ()
 
template<class VISITOR >
InferenceTermination infer (VISITOR &)
 
void reset ()
 
void setStartingPoint (typename std::vector< LabelType >::const_iterator)
 set initial labeling More...
 
InferenceTermination arg (std::vector< LabelType > &, const size_t=1) const
 output a solution More...
 
- Public Member Functions inherited from opengm::Inference< GM, INF::AccumulationType >
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...
 
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
 

Public Attributes

 OPENGM_GM_TYPE_TYPEDEFS
 

Detailed Description

template<class GM, class INF>
class opengm::AlphaBetaSwap< GM, INF >

Alpha-Beta-Swap Algorithm.

Definition at line 15 of file alphabetaswap.hxx.

Member Typedef Documentation

template<class GM, class INF>
typedef INF::AccumulationType opengm::AlphaBetaSwap< GM, INF >::AccumulationType

Definition at line 19 of file alphabetaswap.hxx.

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

Definition at line 22 of file alphabetaswap.hxx.

template<class GM, class INF>
typedef GM opengm::AlphaBetaSwap< GM, INF >::GraphicalModelType

Definition at line 17 of file alphabetaswap.hxx.

template<class GM, class INF>
typedef INF opengm::AlphaBetaSwap< GM, INF >::InferenceType

Definition at line 18 of file alphabetaswap.hxx.

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

Definition at line 23 of file alphabetaswap.hxx.

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

Definition at line 21 of file alphabetaswap.hxx.

Constructor & Destructor Documentation

template<class GM , class INF >
opengm::AlphaBetaSwap< GM, INF >::AlphaBetaSwap ( const GraphicalModelType gm,
Parameter  para = Parameter() 
)
inline

Definition at line 93 of file alphabetaswap.hxx.

Member Function Documentation

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

output a solution

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

Reimplemented from opengm::Inference< GM, INF::AccumulationType >.

Definition at line 290 of file alphabetaswap.hxx.

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

Implements opengm::Inference< GM, INF::AccumulationType >.

Definition at line 87 of file alphabetaswap.hxx.

template<class GM , class INF >
InferenceTermination opengm::AlphaBetaSwap< GM, INF >::infer ( )
virtual

Implements opengm::Inference< GM, INF::AccumulationType >.

Definition at line 171 of file alphabetaswap.hxx.

template<class GM , class INF >
template<class VISITOR >
InferenceTermination opengm::AlphaBetaSwap< GM, INF >::infer ( VISITOR &  visitor)

Definition at line 180 of file alphabetaswap.hxx.

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

Implements opengm::Inference< GM, INF::AccumulationType >.

Definition at line 81 of file alphabetaswap.hxx.

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

Definition at line 59 of file alphabetaswap.hxx.

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

set initial labeling

Parameters
beginiterator to the beginning of a sequence of labels

Reimplemented from opengm::Inference< GM, INF::AccumulationType >.

Definition at line 119 of file alphabetaswap.hxx.

Member Data Documentation

template<class GM, class INF>
opengm::AlphaBetaSwap< GM, INF >::OPENGM_GM_TYPE_TYPEDEFS

Definition at line 20 of file alphabetaswap.hxx.