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

message passing (BPS, TRWS):
[?] More...

#include <trws.hxx>

+ Inheritance diagram for opengm::external::TRWS< GM >:
+ Collaboration diagram for opengm::external::TRWS< GM >:

Classes

struct  Parameter
 Parameter. More...
 
struct  RebindGm
 
struct  RebindGmAndAcc
 

Public Types

typedef GM GraphicalModelType
 
typedef opengm::Minimizer AccumulationType
 
typedef visitors::VerboseVisitor< TRWS< GM > > VerboseVisitorType
 
typedef visitors::EmptyVisitor< TRWS< GM > > EmptyVisitorType
 
typedef visitors::TimingVisitor< TRWS< GM > > TimingVisitorType
 
typedef size_t VariableIndex
 
- Public Types inherited from opengm::Inference< GM, opengm::Minimizer >
typedef GM GraphicalModelType
 
typedef opengm::Minimizer 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

 TRWS (const GraphicalModelType &gm, const Parameter para=Parameter())
 
 ~TRWS ()
 
std::string name () const
 
const GraphicalModelTypegraphicalModel () const
 
template<class VISITOR >
InferenceTermination infer (VISITOR &visitor)
 
InferenceTermination infer ()
 
InferenceTermination arg (std::vector< LabelType > &, const size_t &=1) const
 
InferenceTermination marginal (const size_t variableIndex, IndependentFactorType &out) const
 output a solution for a marginal for a specific variable More...
 
GM::ValueType bound () const
 return a bound on the solution More...
 
GM::ValueType value () const
 return the solution (value) More...
 
- Public Member Functions inherited from opengm::Inference< GM, opengm::Minimizer >
virtual ~Inference ()
 
virtual 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...
 
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
 

Detailed Description

template<class GM>
class opengm::external::TRWS< GM >

message passing (BPS, TRWS):
[?]

TRWS :

Definition at line 39 of file trws.hxx.

Member Typedef Documentation

§ AccumulationType

template<class GM >
typedef opengm::Minimizer opengm::external::TRWS< GM >::AccumulationType

Definition at line 42 of file trws.hxx.

§ EmptyVisitorType

template<class GM >
typedef visitors::EmptyVisitor<TRWS<GM> > opengm::external::TRWS< GM >::EmptyVisitorType

Definition at line 45 of file trws.hxx.

§ GraphicalModelType

template<class GM >
typedef GM opengm::external::TRWS< GM >::GraphicalModelType

Definition at line 41 of file trws.hxx.

§ TimingVisitorType

template<class GM >
typedef visitors::TimingVisitor<TRWS<GM> > opengm::external::TRWS< GM >::TimingVisitorType

Definition at line 46 of file trws.hxx.

§ VariableIndex

template<class GM >
typedef size_t opengm::external::TRWS< GM >::VariableIndex

Definition at line 47 of file trws.hxx.

§ VerboseVisitorType

template<class GM >
typedef visitors::VerboseVisitor<TRWS<GM> > opengm::external::TRWS< GM >::VerboseVisitorType

Definition at line 44 of file trws.hxx.

Constructor & Destructor Documentation

§ TRWS()

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

Definition at line 229 of file trws.hxx.

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

§ ~TRWS()

template<class GM >
opengm::external::TRWS< GM >::~TRWS ( )

Definition at line 287 of file trws.hxx.

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

Member Function Documentation

§ arg()

template<class GM >
InferenceTermination opengm::external::TRWS< GM >::arg ( std::vector< LabelType > &  arg,
const size_t n = 1 
) const
inline

Definition at line 381 of file trws.hxx.

+ Here is the caller graph for this function:

§ bound()

template<class GM >
GM::ValueType opengm::external::TRWS< GM >::bound ( ) const
inlinevirtual

return a bound on the solution

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

Definition at line 458 of file trws.hxx.

+ Here is the caller graph for this function:

§ graphicalModel()

template<class GM >
const TRWS< GM >::GraphicalModelType & opengm::external::TRWS< GM >::graphicalModel ( ) const
inlinevirtual

Implements opengm::Inference< GM, opengm::Minimizer >.

Definition at line 331 of file trws.hxx.

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

§ infer() [1/2]

template<class GM >
template<class VISITOR >
InferenceTermination opengm::external::TRWS< GM >::infer ( VISITOR &  visitor)
inline

Definition at line 348 of file trws.hxx.

+ Here is the call graph for this function:

§ infer() [2/2]

template<class GM >
InferenceTermination opengm::external::TRWS< GM >::infer ( )
inlinevirtual

Implements opengm::Inference< GM, opengm::Minimizer >.

Definition at line 338 of file trws.hxx.

+ Here is the caller graph for this function:

§ marginal()

template<class GM >
InferenceTermination opengm::external::TRWS< GM >::marginal ( const size_t  variableIndex,
IndependentFactorType out 
) const
inline

output a solution for a marginal for a specific variable

Parameters
variableIndexindex of the variable
[out]outthe marginal

Definition at line 439 of file trws.hxx.

+ Here is the caller graph for this function:

§ name()

template<class GM >
std::string opengm::external::TRWS< GM >::name ( ) const
inlinevirtual

Implements opengm::Inference< GM, opengm::Minimizer >.

Definition at line 324 of file trws.hxx.

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

§ value()

template<class GM >
GM::ValueType opengm::external::TRWS< GM >::value ( ) const
inlinevirtual

return the solution (value)

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

Definition at line 463 of file trws.hxx.

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

Member Data Documentation

§ OPENGM_GM_TYPE_TYPEDEFS

template<class GM >
opengm::external::TRWS< GM >::OPENGM_GM_TYPE_TYPEDEFS

Definition at line 43 of file trws.hxx.