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

#include <multicut.hxx>

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

Classes

struct  Parameter
 
struct  rebind
 
struct  RebindGm
 
struct  RebindGmAndAcc
 

Public Types

typedef ACC AccumulationType
 
typedef GM GraphicalModelType
 
typedef size_t LPIndexType
 
typedef visitors::VerboseVisitor< Multicut< GM, ACC > > VerboseVisitorType
 
typedef visitors::EmptyVisitor< Multicut< GM, ACC > > EmptyVisitorType
 
typedef visitors::TimingVisitor< Multicut< GM, ACC > > TimingVisitorType
 
typedef __gnu_cxx::hash_map< IndexType, LPIndexTypeEdgeMapType
 
typedef __gnu_cxx::hash_set< IndexTypeMYSET
 
- 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

virtual ~Multicut ()
 
 Multicut (const GraphicalModelType &, Parameter para=Parameter())
 
 Multicut (const size_t, const std::map< UInt64Type, ValueType > &accWeights, const Parameter &para=Parameter())
 
virtual std::string name () const
 
const GraphicalModelTypegraphicalModel () const
 
virtual InferenceTermination infer ()
 
template<class VisitorType >
InferenceTermination infer (VisitorType &)
 
virtual InferenceTermination arg (std::vector< LabelType > &, const size_t=1) const
 output a solution More...
 
ValueType bound () const
 return a bound on the solution More...
 
ValueType value () const
 return the solution (value) More...
 
ValueType calcBound ()
 
ValueType evaluate (std::vector< LabelType > &) const
 
template<class LPVariableIndexIterator , class CoefficientIterator >
void addConstraint (LPVariableIndexIterator, LPVariableIndexIterator, CoefficientIterator, const ValueType &, const ValueType &)
 
std::vector< double > getEdgeLabeling () const
 
std::vector< size_tgetSegmentation () const
 
template<class IT >
size_t getLPIndex (IT a, IT b)
 
- 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...
 
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
 
size_t inferenceState_
 
size_t constraintCounter_
 

Detailed Description

template<class GM, class ACC>
class opengm::Multicut< GM, ACC >

Definition at line 77 of file multicut.hxx.

Member Typedef Documentation

§ AccumulationType

template<class GM, class ACC>
typedef ACC opengm::Multicut< GM, ACC >::AccumulationType

Definition at line 80 of file multicut.hxx.

§ EdgeMapType

template<class GM, class ACC>
typedef __gnu_cxx::hash_map<IndexType, LPIndexType> opengm::Multicut< GM, ACC >::EdgeMapType

Definition at line 101 of file multicut.hxx.

§ EmptyVisitorType

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

Definition at line 85 of file multicut.hxx.

§ GraphicalModelType

template<class GM, class ACC>
typedef GM opengm::Multicut< GM, ACC >::GraphicalModelType

Definition at line 81 of file multicut.hxx.

§ LPIndexType

template<class GM, class ACC>
typedef size_t opengm::Multicut< GM, ACC >::LPIndexType

Definition at line 83 of file multicut.hxx.

§ MYSET

template<class GM, class ACC>
typedef __gnu_cxx::hash_set<IndexType> opengm::Multicut< GM, ACC >::MYSET

Definition at line 102 of file multicut.hxx.

§ TimingVisitorType

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

Definition at line 86 of file multicut.hxx.

§ VerboseVisitorType

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

Definition at line 84 of file multicut.hxx.

Constructor & Destructor Documentation

§ ~Multicut()

template<class GM , class ACC >
opengm::Multicut< GM, ACC >::~Multicut ( )
virtual

Definition at line 480 of file multicut.hxx.

+ Here is the call graph for this function:

§ Multicut() [1/2]

template<class GM , class ACC >
opengm::Multicut< GM, ACC >::Multicut ( const GraphicalModelType gm,
Parameter  para = Parameter() 
)

Definition at line 486 of file multicut.hxx.

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

§ Multicut() [2/2]

template<class GM , class ACC >
opengm::Multicut< GM, ACC >::Multicut ( const size_t  numNodes,
const std::map< UInt64Type, ValueType > &  accWeights,
const Parameter para = Parameter() 
)

Definition at line 305 of file multicut.hxx.

Member Function Documentation

§ addConstraint()

template<class GM , class ACC >
template<class LPVariableIndexIterator , class CoefficientIterator >
void opengm::Multicut< GM, ACC >::addConstraint ( LPVariableIndexIterator  viBegin,
LPVariableIndexIterator  viEnd,
CoefficientIterator  coefficient,
const ValueType lowerBound,
const ValueType upperBound 
)

Definition at line 2535 of file multicut.hxx.

+ Here is the caller graph for this function:

§ arg()

template<class GM, class ACC>
InferenceTermination opengm::Multicut< GM, ACC >::arg ( std::vector< LabelType > &  arg,
const size_t  argIndex = 1 
) const
virtual

output a solution

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

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

Definition at line 2016 of file multicut.hxx.

+ Here is the caller graph for this function:

§ bound()

template<class GM , class ACC >
GM::ValueType opengm::Multicut< GM, ACC >::bound ( ) const
virtual

return a bound on the solution

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

Definition at line 2264 of file multicut.hxx.

§ calcBound()

template<class GM, class ACC>
ValueType opengm::Multicut< GM, ACC >::calcBound ( )
inline

Definition at line 186 of file multicut.hxx.

§ evaluate()

template<class GM , class ACC >
Multicut< GM, ACC >::ValueType opengm::Multicut< GM, ACC >::evaluate ( std::vector< LabelType > &  conf) const

Definition at line 2248 of file multicut.hxx.

+ Here is the caller graph for this function:

§ getEdgeLabeling()

template<class GM , class ACC >
std::vector< double > opengm::Multicut< GM, ACC >::getEdgeLabeling ( ) const

Definition at line 2519 of file multicut.hxx.

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

§ getLPIndex()

template<class GM, class ACC>
template<class IT >
size_t opengm::Multicut< GM, ACC >::getLPIndex ( IT  a,
IT  b 
)
inline

Definition at line 196 of file multicut.hxx.

§ getSegmentation()

template<class GM , class ACC >
std::vector< size_t > opengm::Multicut< GM, ACC >::getSegmentation ( ) const

Definition at line 2063 of file multicut.hxx.

+ Here is the call graph for this function:

§ graphicalModel()

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

Implements opengm::Inference< GM, ACC >.

Definition at line 2258 of file multicut.hxx.

§ infer() [1/2]

template<class GM , class ACC >
InferenceTermination opengm::Multicut< GM, ACC >::infer ( )
virtual

Implements opengm::Inference< GM, ACC >.

Definition at line 1673 of file multicut.hxx.

+ Here is the call graph for this function:

§ infer() [2/2]

template<class GM , class ACC >
template<class VisitorType >
InferenceTermination opengm::Multicut< GM, ACC >::infer ( VisitorType &  mcv)

Definition at line 1711 of file multicut.hxx.

+ Here is the call graph for this function:

§ name()

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

Implements opengm::Inference< GM, ACC >.

Definition at line 179 of file multicut.hxx.

+ Here is the call graph for this function:

§ value()

template<class GM , class ACC >
GM::ValueType opengm::Multicut< GM, ACC >::value ( ) const
virtual

return the solution (value)

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

Definition at line 2270 of file multicut.hxx.

+ Here is the call graph for this function:

Member Data Documentation

§ constraintCounter_

template<class GM, class ACC>
size_t opengm::Multicut< GM, ACC >::constraintCounter_

Definition at line 199 of file multicut.hxx.

§ inferenceState_

template<class GM, class ACC>
size_t opengm::Multicut< GM, ACC >::inferenceState_

Definition at line 196 of file multicut.hxx.

§ OPENGM_GM_TYPE_TYPEDEFS

template<class GM, class ACC>
opengm::Multicut< GM, ACC >::OPENGM_GM_TYPE_TYPEDEFS

Definition at line 82 of file multicut.hxx.