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
 

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

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

Definition at line 80 of file multicut.hxx.

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

Definition at line 93 of file multicut.hxx.

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

Definition at line 85 of file multicut.hxx.

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

Definition at line 81 of file multicut.hxx.

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

Definition at line 83 of file multicut.hxx.

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

Definition at line 94 of file multicut.hxx.

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

Definition at line 86 of file multicut.hxx.

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

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

Definition at line 455 of file multicut.hxx.

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

Definition at line 461 of file multicut.hxx.

+ Here is the call graph for this function:

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 280 of file multicut.hxx.

Member Function Documentation

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 2510 of file multicut.hxx.

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 1991 of file multicut.hxx.

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 2239 of file multicut.hxx.

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

Definition at line 161 of file multicut.hxx.

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

Definition at line 2223 of file multicut.hxx.

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

Definition at line 2494 of file multicut.hxx.

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

Definition at line 171 of file multicut.hxx.

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

Definition at line 2038 of file multicut.hxx.

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 2233 of file multicut.hxx.

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

Implements opengm::Inference< GM, ACC >.

Definition at line 1648 of file multicut.hxx.

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

Definition at line 1686 of file multicut.hxx.

+ Here is the call graph for this function:

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

Implements opengm::Inference< GM, ACC >.

Definition at line 154 of file multicut.hxx.

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 2245 of file multicut.hxx.

Member Data Documentation

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

Definition at line 174 of file multicut.hxx.

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

Definition at line 171 of file multicut.hxx.

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

Definition at line 82 of file multicut.hxx.