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

Gibbs sampling. More...

#include <gibbs.hxx>

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

Classes

class  Parameter
 

Public Types

typedef ACC AccumulationType
 
typedef GM GraphicalModelType
 
typedef Movemaker< GraphicalModelTypeMovemakerType
 
typedef visitors::VerboseVisitor< Gibbs< GM, ACC > > VerboseVisitorType
 
typedef visitors::EmptyVisitor< Gibbs< GM, ACC > > EmptyVisitorType
 
typedef visitors::TimingVisitor< Gibbs< GM, ACC > > TimingVisitorType
 
typedef double ProbabilityType
 
- 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

 Gibbs (const GraphicalModelType &, const Parameter &param=Parameter())
 
std::string name () const
 
const GraphicalModelTypegraphicalModel () const
 
void reset ()
 
InferenceTermination infer ()
 
template<class VISITOR >
InferenceTermination infer (VISITOR &)
 
void setStartingPoint (typename std::vector< LabelType >::const_iterator)
 set initial labeling More...
 
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 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::Gibbs< GM, ACC >

Gibbs sampling.

Examples:
gibbs.cxx.

Definition at line 95 of file gibbs.hxx.

Member Typedef Documentation

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

Definition at line 98 of file gibbs.hxx.

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

Definition at line 103 of file gibbs.hxx.

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

Definition at line 99 of file gibbs.hxx.

template<class GM, class ACC>
typedef Movemaker<GraphicalModelType> opengm::Gibbs< GM, ACC >::MovemakerType

Definition at line 101 of file gibbs.hxx.

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

Definition at line 105 of file gibbs.hxx.

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

Definition at line 104 of file gibbs.hxx.

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

Definition at line 102 of file gibbs.hxx.

Constructor & Destructor Documentation

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

Definition at line 184 of file gibbs.hxx.

Member Function Documentation

template<class GM , class ACC >
InferenceTermination opengm::Gibbs< 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 390 of file gibbs.hxx.

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

Definition at line 431 of file gibbs.hxx.

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

Definition at line 441 of file gibbs.hxx.

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

Implements opengm::Inference< GM, ACC >.

Definition at line 256 of file gibbs.hxx.

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

Implements opengm::Inference< GM, ACC >.

Definition at line 263 of file gibbs.hxx.

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

Definition at line 271 of file gibbs.hxx.

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

Definition at line 413 of file gibbs.hxx.

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

Definition at line 423 of file gibbs.hxx.

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

Implements opengm::Inference< GM, ACC >.

Definition at line 249 of file gibbs.hxx.

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

Definition at line 210 of file gibbs.hxx.

template<class GM, class ACC>
void opengm::Gibbs< 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 230 of file gibbs.hxx.

Member Data Documentation

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

Definition at line 100 of file gibbs.hxx.