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

A framework for min st-cut algorithms. More...

#include <graphcut.hxx>

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

Classes

struct  Parameter
 

Public Types

typedef ACC AccumulationType
 
typedef GM GraphicalModelType
 
typedef MINSTCUT MinStCutType
 
typedef visitors::VerboseVisitor< GraphCut< GM, ACC, MINSTCUT > > VerboseVisitorType
 
typedef visitors::EmptyVisitor< GraphCut< GM, ACC, MINSTCUT > > EmptyVisitorType
 
typedef visitors::TimingVisitor< GraphCut< GM, ACC, MINSTCUT > > 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

 GraphCut (const GraphicalModelType &, const Parameter &=Parameter(), ValueType=static_cast< ValueType >(0.0))
 
 GraphCut (size_t numVar, std::vector< size_t > numFacDim, const Parameter &=Parameter(), ValueType=static_cast< ValueType >(0.0))
 
 ~GraphCut ()
 
std::string name () const
 
const GraphicalModelTypegraphicalModel () const
 
template<class FACTOR >
void addFactor (const FACTOR &factor)
 add a factor of the GraphicalModel to the min st-cut formulation of the solver MinStCutType More...
 
InferenceTermination infer ()
 
template<class VISITOR >
InferenceTermination infer (VISITOR &visitor)
 
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 void setStartingPoint (typename std::vector< LabelType >::const_iterator)
 set initial labeling 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
 

Public Attributes

 OPENGM_GM_TYPE_TYPEDEFS
 

Detailed Description

template<class GM, class ACC, class MINSTCUT>
class opengm::GraphCut< GM, ACC, MINSTCUT >

A framework for min st-cut algorithms.

Definition at line 18 of file graphcut.hxx.

Member Typedef Documentation

template<class GM, class ACC, class MINSTCUT>
typedef ACC opengm::GraphCut< GM, ACC, MINSTCUT >::AccumulationType

Definition at line 20 of file graphcut.hxx.

template<class GM, class ACC, class MINSTCUT>
typedef visitors::EmptyVisitor<GraphCut<GM, ACC, MINSTCUT> > opengm::GraphCut< GM, ACC, MINSTCUT >::EmptyVisitorType

Definition at line 25 of file graphcut.hxx.

template<class GM, class ACC, class MINSTCUT>
typedef GM opengm::GraphCut< GM, ACC, MINSTCUT >::GraphicalModelType

Definition at line 21 of file graphcut.hxx.

template<class GM, class ACC, class MINSTCUT>
typedef MINSTCUT opengm::GraphCut< GM, ACC, MINSTCUT >::MinStCutType

Definition at line 23 of file graphcut.hxx.

template<class GM, class ACC, class MINSTCUT>
typedef visitors::TimingVisitor<GraphCut<GM, ACC, MINSTCUT> > opengm::GraphCut< GM, ACC, MINSTCUT >::TimingVisitorType

Definition at line 26 of file graphcut.hxx.

template<class GM, class ACC, class MINSTCUT>
typedef visitors::VerboseVisitor<GraphCut<GM, ACC, MINSTCUT> > opengm::GraphCut< GM, ACC, MINSTCUT >::VerboseVisitorType

Definition at line 24 of file graphcut.hxx.

Constructor & Destructor Documentation

template<class GM , class ACC , class MINSTCUT >
opengm::GraphCut< GM, ACC, MINSTCUT >::GraphCut ( const GraphicalModelType gm,
const Parameter para = Parameter(),
ValueType  tolerance = static_cast<ValueType>(0.0) 
)
inline

Definition at line 103 of file graphcut.hxx.

template<class GM , class ACC , class MINSTCUT >
opengm::GraphCut< GM, ACC, MINSTCUT >::GraphCut ( size_t  numVar,
std::vector< size_t numFacDim,
const Parameter para = Parameter(),
ValueType  tolerance = static_cast<ValueType>(0.0) 
)
inline

Definition at line 78 of file graphcut.hxx.

template<class GM , class ACC , class MINSTCUT >
opengm::GraphCut< GM, ACC, MINSTCUT >::~GraphCut ( )
inline

Definition at line 144 of file graphcut.hxx.

Member Function Documentation

template<class GM , class ACC , class MINSTCUT >
template<class FACTOR >
void opengm::GraphCut< GM, ACC, MINSTCUT >::addFactor ( const FACTOR &  factor)
inline

add a factor of the GraphicalModel to the min st-cut formulation of the solver MinStCutType

Definition at line 153 of file graphcut.hxx.

template<class GM , class ACC , class MINSTCUT >
InferenceTermination opengm::GraphCut< GM, ACC, MINSTCUT >::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 372 of file graphcut.hxx.

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

Implements opengm::Inference< GM, ACC >.

Definition at line 72 of file graphcut.hxx.

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

Implements opengm::Inference< GM, ACC >.

Definition at line 350 of file graphcut.hxx.

template<class GM , class ACC , class MINSTCUT >
template<class VISITOR >
InferenceTermination opengm::GraphCut< GM, ACC, MINSTCUT >::infer ( VISITOR &  visitor)
inline

Definition at line 358 of file graphcut.hxx.

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

Implements opengm::Inference< GM, ACC >.

Definition at line 66 of file graphcut.hxx.

Member Data Documentation

template<class GM, class ACC, class MINSTCUT>
opengm::GraphCut< GM, ACC, MINSTCUT >::OPENGM_GM_TYPE_TYPEDEFS

Definition at line 22 of file graphcut.hxx.