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
 

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 &, const size_t=2, const Tribool useMultilabelInference=Tribool::Maybe)
 
 LazyFlipper (const GraphicalModelType &gm, typename LazyFlipper::Parameter param)
 
template<class StateIterator >
 LazyFlipper (const GraphicalModelType &, const size_t, StateIterator, const Tribool useMultilabelInference=Tribool::Maybe)
 
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

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

Definition at line 120 of file lazyflipper.hxx.

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

Definition at line 127 of file lazyflipper.hxx.

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

Definition at line 121 of file lazyflipper.hxx.

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

Definition at line 123 of file lazyflipper.hxx.

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

Definition at line 124 of file lazyflipper.hxx.

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

Definition at line 128 of file lazyflipper.hxx.

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

Definition at line 126 of file lazyflipper.hxx.

Constructor & Destructor Documentation

template<class GM , class ACC >
opengm::LazyFlipper< GM, ACC >::LazyFlipper ( const GraphicalModelType gm,
const size_t  maxSubgraphSize = 2,
const Tribool  useMultilabelInference = Tribool::Maybe 
)
inline

Definition at line 590 of file lazyflipper.hxx.

+ Here is the call graph for this function:

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

Definition at line 622 of file lazyflipper.hxx.

+ Here is the call graph for this function:

template<class GM , class ACC >
template<class StateIterator >
opengm::LazyFlipper< GM, ACC >::LazyFlipper ( const GraphicalModelType gm,
const size_t  maxSubgraphSize,
StateIterator  it,
const Tribool  useMultilabelInference = Tribool::Maybe 
)
inline

Definition at line 663 of file lazyflipper.hxx.

+ Here is the call graph for this function:

Member Function Documentation

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 955 of file lazyflipper.hxx.

+ Here is the caller graph for this function:

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 711 of file lazyflipper.hxx.

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

start the algorithm

Implements opengm::Inference< GM, ACC >.

Definition at line 773 of file lazyflipper.hxx.

+ Here is the caller graph for this function:

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

start the algorithm

Definition at line 741 of file lazyflipper.hxx.

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

Definition at line 718 of file lazyflipper.hxx.

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

Implements opengm::Inference< GM, ACC >.

Definition at line 704 of file lazyflipper.hxx.

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

Definition at line 656 of file lazyflipper.hxx.

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

Definition at line 725 of file lazyflipper.hxx.

+ Here is the caller graph for this function:

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 696 of file lazyflipper.hxx.

+ Here is the caller graph for this function:

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 974 of file lazyflipper.hxx.

Member Data Documentation

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

Definition at line 125 of file lazyflipper.hxx.

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

Definition at line 122 of file lazyflipper.hxx.