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

FastPD FastPD inference algorithm class. More...

#include <fastPD.hxx>

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

Classes

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

Public Types

typedef GM GraphicalModelType
 
typedef opengm::Minimizer AccumulationType
 
typedef visitors::VerboseVisitor< FastPD< GM > > VerboseVisitorType
 
typedef visitors::EmptyVisitor< FastPD< GM > > EmptyVisitorType
 
typedef visitors::TimingVisitor< FastPD< GM > > TimingVisitorType
 
typedef LPReparametrizer< GM, opengm::MinimizerReparametrizerType
 
- 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

 FastPD (const GraphicalModelType &gm, const Parameter &para=Parameter())
 
 ~FastPD ()
 
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
 
GM::ValueType bound () const
 return a bound on the solution More...
 
GM::ValueType value () const
 return the solution (value) More...
 
ReparametrizerTypegetReparametrizer (const typename ReparametrizerType::Parameter &params=typename ReparametrizerType::Parameter()) const
 
- 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
 

Protected Member Functions

bool sameNumberOfLabels () const
 
void setLabelCosts ()
 
void getNumPairs ()
 
void setPairs ()
 
void setDistance ()
 
void setWeights ()
 
bool sameEnergyTable ()
 

Protected Attributes

const GraphicalModelTypegm_
 
Parameter parameter_
 
fastPDLib::CV_Fast_PD * pdInference_
 
ValueType value_
 
ValueType lowerBound_
 
fastPDLib::CV_Fast_PD::Real * labelCosts_
 
int numPairs_
 
int * pairs_
 
fastPDLib::CV_Fast_PD::Real * distance_
 
fastPDLib::CV_Fast_PD::Real * weights_
 

Detailed Description

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

FastPD FastPD inference algorithm class.

Maximum factor order : ?

Definition at line 29 of file fastPD.hxx.

Member Typedef Documentation

§ AccumulationType

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

Definition at line 32 of file fastPD.hxx.

§ EmptyVisitorType

Definition at line 35 of file fastPD.hxx.

§ GraphicalModelType

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

Definition at line 31 of file fastPD.hxx.

§ ReparametrizerType

Definition at line 77 of file fastPD.hxx.

§ TimingVisitorType

Definition at line 36 of file fastPD.hxx.

§ VerboseVisitorType

Definition at line 34 of file fastPD.hxx.

Constructor & Destructor Documentation

§ FastPD()

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

Definition at line 103 of file fastPD.hxx.

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

§ ~FastPD()

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

Definition at line 136 of file fastPD.hxx.

+ Here is the caller graph for this function:

Member Function Documentation

§ arg()

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

Definition at line 187 of file fastPD.hxx.

+ Here is the caller graph for this function:

§ bound()

template<class GM >
GM::ValueType opengm::external::FastPD< GM >::bound ( ) const
virtual

return a bound on the solution

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

Definition at line 204 of file fastPD.hxx.

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

§ getNumPairs()

template<class GM >
void opengm::external::FastPD< GM >::getNumPairs ( )
inlineprotected

Definition at line 297 of file fastPD.hxx.

+ Here is the caller graph for this function:

§ getReparametrizer()

template<class GM >
FastPD< GM >::ReparametrizerType * opengm::external::FastPD< GM >::getReparametrizer ( const typename ReparametrizerType::Parameter params = typename ReparametrizerType::Parameter()) const
inline

Definition at line 395 of file fastPD.hxx.

+ Here is the call graph for this function:

§ graphicalModel()

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

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

Definition at line 160 of file fastPD.hxx.

+ Here is the caller graph for this function:

§ infer() [1/2]

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

Definition at line 172 of file fastPD.hxx.

+ Here is the call graph for this function:

§ infer() [2/2]

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

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

Definition at line 165 of file fastPD.hxx.

+ Here is the caller graph for this function:

§ name()

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

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

Definition at line 155 of file fastPD.hxx.

+ Here is the caller graph for this function:

§ sameEnergyTable()

template<class GM >
bool opengm::external::FastPD< GM >::sameEnergyTable ( )
inlineprotected

Definition at line 375 of file fastPD.hxx.

+ Here is the caller graph for this function:

§ sameNumberOfLabels()

template<class GM >
bool opengm::external::FastPD< GM >::sameNumberOfLabels ( ) const
inlineprotected

Definition at line 266 of file fastPD.hxx.

+ Here is the caller graph for this function:

§ setDistance()

template<class GM >
void opengm::external::FastPD< GM >::setDistance ( )
inlineprotected

Definition at line 319 of file fastPD.hxx.

+ Here is the caller graph for this function:

§ setLabelCosts()

template<class GM >
void opengm::external::FastPD< GM >::setLabelCosts ( )
inlineprotected

Definition at line 278 of file fastPD.hxx.

+ Here is the caller graph for this function:

§ setPairs()

template<class GM >
void opengm::external::FastPD< GM >::setPairs ( )
inlineprotected

Definition at line 306 of file fastPD.hxx.

+ Here is the caller graph for this function:

§ setWeights()

template<class GM >
void opengm::external::FastPD< GM >::setWeights ( )
inlineprotected

Definition at line 340 of file fastPD.hxx.

+ Here is the caller graph for this function:

§ value()

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

return the solution (value)

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

Definition at line 261 of file fastPD.hxx.

+ Here is the caller graph for this function:

Member Data Documentation

§ distance_

template<class GM>
fastPDLib::CV_Fast_PD::Real* opengm::external::FastPD< GM >::distance_
protected

Definition at line 90 of file fastPD.hxx.

§ gm_

template<class GM>
const GraphicalModelType& opengm::external::FastPD< GM >::gm_
protected

Definition at line 81 of file fastPD.hxx.

§ labelCosts_

template<class GM>
fastPDLib::CV_Fast_PD::Real* opengm::external::FastPD< GM >::labelCosts_
protected

Definition at line 87 of file fastPD.hxx.

§ lowerBound_

template<class GM>
ValueType opengm::external::FastPD< GM >::lowerBound_
protected

Definition at line 85 of file fastPD.hxx.

§ numPairs_

template<class GM>
int opengm::external::FastPD< GM >::numPairs_
protected

Definition at line 88 of file fastPD.hxx.

§ OPENGM_GM_TYPE_TYPEDEFS

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

Definition at line 33 of file fastPD.hxx.

§ pairs_

template<class GM>
int* opengm::external::FastPD< GM >::pairs_
protected

Definition at line 89 of file fastPD.hxx.

§ parameter_

template<class GM>
Parameter opengm::external::FastPD< GM >::parameter_
protected

Definition at line 82 of file fastPD.hxx.

§ pdInference_

template<class GM>
fastPDLib::CV_Fast_PD* opengm::external::FastPD< GM >::pdInference_
protected

Definition at line 83 of file fastPD.hxx.

§ value_

template<class GM>
ValueType opengm::external::FastPD< GM >::value_
protected

Definition at line 84 of file fastPD.hxx.

§ weights_

template<class GM>
fastPDLib::CV_Fast_PD::Real* opengm::external::FastPD< GM >::weights_
protected

Definition at line 91 of file fastPD.hxx.