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

Generalized Swendsen-Wang sampling

A. Barbu, S. Zhu, "Generalizing swendsen-wang to sampling arbitrary posterior probabilities", PAMI 27:1239-1253, 2005. More...

#include <swendsenwang.hxx>

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

Classes

struct  Parameter
 

Public Types

typedef GM GraphicalModelType
 
typedef ACC AccumulationType
 
typedef double ProbabilityType
 
typedef SwendsenWangEmptyVisitor< SwendsenWang< GM, ACC > > EmptyVisitorType
 
typedef SwendsenWangVerboseVisitor< SwendsenWang< GM, ACC > > VerboseVisitorType
 
typedef TimingVisitor< SwendsenWang< 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

 SwendsenWang (const GraphicalModelType &, const Parameter &param=Parameter())
 
virtual std::string name () const
 
virtual const GraphicalModelTypegraphicalModel () const
 
virtual void reset ()
 
virtual InferenceTermination infer ()
 
template<class VISITOR >
InferenceTermination infer (VISITOR &)
 
virtual InferenceTermination arg (std::vector< LabelType > &, const size_t=1) const
 output a solution More...
 
LabelType markovState (const size_t) const
 
ValueType markovValue () const
 
LabelType currentBestState (const size_t) const
 
ValueType currentBestValue () const
 
- 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 opengm::SwendsenWang< GM, ACC >

Generalized Swendsen-Wang sampling

A. Barbu, S. Zhu, "Generalizing swendsen-wang to sampling arbitrary posterior probabilities", PAMI 27:1239-1253, 2005.

Examples:
swendsenwang.cxx.

Definition at line 115 of file swendsenwang.hxx.

Member Typedef Documentation

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

Definition at line 119 of file swendsenwang.hxx.

template<class GM, class ACC>
typedef SwendsenWangEmptyVisitor<SwendsenWang<GM, ACC> > opengm::SwendsenWang< GM, ACC >::EmptyVisitorType

Definition at line 122 of file swendsenwang.hxx.

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

Definition at line 118 of file swendsenwang.hxx.

template<class GM, class ACC>
typedef double opengm::SwendsenWang< GM, ACC >::ProbabilityType

Definition at line 121 of file swendsenwang.hxx.

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

Definition at line 124 of file swendsenwang.hxx.

template<class GM, class ACC>
typedef SwendsenWangVerboseVisitor<SwendsenWang<GM, ACC> > opengm::SwendsenWang< GM, ACC >::VerboseVisitorType

Definition at line 123 of file swendsenwang.hxx.

Constructor & Destructor Documentation

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

Definition at line 179 of file swendsenwang.hxx.

Member Function Documentation

template<class GM , class ACC >
InferenceTermination opengm::SwendsenWang< 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 371 of file swendsenwang.hxx.

template<class GM , class ACC >
SwendsenWang< GM, ACC >::LabelType opengm::SwendsenWang< GM, ACC >::currentBestState ( const size_t  j) const
inline

Definition at line 405 of file swendsenwang.hxx.

template<class GM , class ACC >
SwendsenWang< GM, ACC >::ValueType opengm::SwendsenWang< GM, ACC >::currentBestValue ( ) const
inline

Definition at line 415 of file swendsenwang.hxx.

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

Implements opengm::Inference< GM, ACC >.

Definition at line 229 of file swendsenwang.hxx.

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

Implements opengm::Inference< GM, ACC >.

Definition at line 362 of file swendsenwang.hxx.

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

Definition at line 238 of file swendsenwang.hxx.

template<class GM , class ACC >
SwendsenWang< GM, ACC >::LabelType opengm::SwendsenWang< GM, ACC >::markovState ( const size_t  j) const
inline

Definition at line 387 of file swendsenwang.hxx.

template<class GM , class ACC >
SwendsenWang< GM, ACC >::ValueType opengm::SwendsenWang< GM, ACC >::markovValue ( ) const
inline

Definition at line 397 of file swendsenwang.hxx.

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

Implements opengm::Inference< GM, ACC >.

Definition at line 222 of file swendsenwang.hxx.

template<class GM , class ACC >
void opengm::SwendsenWang< GM, ACC >::reset ( )
inlinevirtual

Definition at line 203 of file swendsenwang.hxx.

Member Data Documentation

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

Definition at line 120 of file swendsenwang.hxx.