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

A generalization of ICM

B. Andres, J. H. Kappes, U. Koethe and Hamprecht F. A., The Lazy Flipper: MAP Inference in Higher-Order Graphical Models by Depth-limited Exhaustive Search, Technical Report, 2010, http://arxiv.org/abs/1009.4102. More...

#include <lazyflipper.hxx>

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

Classes

struct  Parameter
 
struct  RebindGm
 
struct  RebindGmAndAcc
 

Public Types

typedef ACC AccumulationType
 
typedef GM GraphicalModelType
 
typedef Forest< IndexTypeSubgraphForest
 
typedef size_t SubgraphForestNode
 
typedef visitors::VerboseVisitor< LazyFlipper< GM, ACC > > VerboseVisitorType
 
typedef visitors::EmptyVisitor< LazyFlipper< GM, ACC > > EmptyVisitorType
 
typedef visitors::TimingVisitor< LazyFlipper< GM, ACC > > 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

 LazyFlipper (const GraphicalModelType &gm, Parameter param=Parameter())
 
std::string name () const
 
const GraphicalModelTypegraphicalModel () const
 
const size_t maxSubgraphSize () const
 
ValueType value () const
 return the solution (value) More...
 
void setMaxSubgraphSize (const size_t)
 
void reset ()
 
InferenceTermination infer ()
 start the algorithm More...
 
template<class VisitorType >
InferenceTermination infer (VisitorType &)
 start the algorithm More...
 
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, 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...
 
virtual ValueType bound () const
 return a bound on the solution 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
 

Static Public Attributes

static const SubgraphForestNode NONODE = SubgraphForest::NONODE
 

Detailed Description

template<class GM, class ACC = Minimizer>
class opengm::LazyFlipper< GM, ACC >

A generalization of ICM

B. Andres, J. H. Kappes, U. Koethe and Hamprecht F. A., The Lazy Flipper: MAP Inference in Higher-Order Graphical Models by Depth-limited Exhaustive Search, Technical Report, 2010, http://arxiv.org/abs/1009.4102.

Examples:
interpixel_boundary_segmentation.cxx.

Definition at line 118 of file lazyflipper.hxx.

Member Typedef Documentation

§ AccumulationType

template<class GM, class ACC = Minimizer>
typedef ACC opengm::LazyFlipper< GM, ACC >::AccumulationType

Definition at line 132 of file lazyflipper.hxx.

§ EmptyVisitorType

template<class GM, class ACC = Minimizer>
typedef visitors::EmptyVisitor<LazyFlipper<GM, ACC> > opengm::LazyFlipper< GM, ACC >::EmptyVisitorType

Definition at line 139 of file lazyflipper.hxx.

§ GraphicalModelType

template<class GM, class ACC = Minimizer>
typedef GM opengm::LazyFlipper< GM, ACC >::GraphicalModelType

Definition at line 133 of file lazyflipper.hxx.

§ SubgraphForest

template<class GM, class ACC = Minimizer>
typedef Forest<IndexType> opengm::LazyFlipper< GM, ACC >::SubgraphForest

Definition at line 135 of file lazyflipper.hxx.

§ SubgraphForestNode

template<class GM, class ACC = Minimizer>
typedef size_t opengm::LazyFlipper< GM, ACC >::SubgraphForestNode

Definition at line 136 of file lazyflipper.hxx.

§ TimingVisitorType

template<class GM, class ACC = Minimizer>
typedef visitors::TimingVisitor<LazyFlipper<GM, ACC> > opengm::LazyFlipper< GM, ACC >::TimingVisitorType

Definition at line 140 of file lazyflipper.hxx.

§ VerboseVisitorType

template<class GM, class ACC = Minimizer>
typedef visitors::VerboseVisitor<LazyFlipper<GM, ACC> > opengm::LazyFlipper< GM, ACC >::VerboseVisitorType

Definition at line 138 of file lazyflipper.hxx.

Constructor & Destructor Documentation

§ LazyFlipper()

template<class GM , class ACC >
opengm::LazyFlipper< GM, ACC >::LazyFlipper ( const GraphicalModelType gm,
typename LazyFlipper< GM, ACC >::Parameter  param = Parameter() 
)
inline

Definition at line 643 of file lazyflipper.hxx.

+ Here is the call graph for this function:

Member Function Documentation

§ arg()

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

Definition at line 976 of file lazyflipper.hxx.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ graphicalModel()

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

Implements opengm::Inference< GM, ACC >.

Definition at line 732 of file lazyflipper.hxx.

§ infer() [1/2]

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

start the algorithm

Implements opengm::Inference< GM, ACC >.

Definition at line 794 of file lazyflipper.hxx.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ infer() [2/2]

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

start the algorithm

Definition at line 762 of file lazyflipper.hxx.

§ maxSubgraphSize()

template<class GM , class ACC >
const size_t opengm::LazyFlipper< GM, ACC >::maxSubgraphSize ( ) const
inline

Definition at line 739 of file lazyflipper.hxx.

+ Here is the caller graph for this function:

§ name()

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

Implements opengm::Inference< GM, ACC >.

Definition at line 725 of file lazyflipper.hxx.

§ reset()

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

Definition at line 677 of file lazyflipper.hxx.

§ setMaxSubgraphSize()

template<class GM , class ACC >
void opengm::LazyFlipper< GM, ACC >::setMaxSubgraphSize ( const size_t  maxSubgraphSize)
inline

Definition at line 746 of file lazyflipper.hxx.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ setStartingPoint()

template<class GM, class ACC = Minimizer>
void opengm::LazyFlipper< GM, ACC >::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 717 of file lazyflipper.hxx.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ value()

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

return the solution (value)

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

Definition at line 995 of file lazyflipper.hxx.

+ Here is the call graph for this function:

Member Data Documentation

§ NONODE

template<class GM, class ACC = Minimizer>
const SubgraphForestNode opengm::LazyFlipper< GM, ACC >::NONODE = SubgraphForest::NONODE
static

Definition at line 137 of file lazyflipper.hxx.

§ OPENGM_GM_TYPE_TYPEDEFS

template<class GM, class ACC = Minimizer>
opengm::LazyFlipper< GM, ACC >::OPENGM_GM_TYPE_TYPEDEFS

Definition at line 134 of file lazyflipper.hxx.