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...
 

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

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

Definition at line 32 of file fastPD.hxx.

Definition at line 35 of file fastPD.hxx.

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

Definition at line 31 of file fastPD.hxx.

Definition at line 61 of file fastPD.hxx.

Definition at line 36 of file fastPD.hxx.

Definition at line 34 of file fastPD.hxx.

Constructor & Destructor Documentation

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

Definition at line 87 of file fastPD.hxx.

+ Here is the call graph for this function:

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

Definition at line 120 of file fastPD.hxx.

Member Function Documentation

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

Definition at line 171 of file fastPD.hxx.

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 188 of file fastPD.hxx.

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

Definition at line 281 of file fastPD.hxx.

+ Here is the caller graph for this function:

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

Definition at line 379 of file fastPD.hxx.

+ Here is the call graph for this function:

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

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

Definition at line 144 of file fastPD.hxx.

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

Definition at line 156 of file fastPD.hxx.

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

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

Definition at line 149 of file fastPD.hxx.

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

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

Definition at line 139 of file fastPD.hxx.

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

Definition at line 359 of file fastPD.hxx.

+ Here is the caller graph for this function:

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

Definition at line 250 of file fastPD.hxx.

+ Here is the caller graph for this function:

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

Definition at line 303 of file fastPD.hxx.

+ Here is the caller graph for this function:

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

Definition at line 262 of file fastPD.hxx.

+ Here is the caller graph for this function:

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

Definition at line 290 of file fastPD.hxx.

+ Here is the caller graph for this function:

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

Definition at line 324 of file fastPD.hxx.

+ Here is the caller graph for this function:

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 245 of file fastPD.hxx.

Member Data Documentation

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

Definition at line 74 of file fastPD.hxx.

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

Definition at line 65 of file fastPD.hxx.

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

Definition at line 71 of file fastPD.hxx.

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

Definition at line 69 of file fastPD.hxx.

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

Definition at line 72 of file fastPD.hxx.

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

Definition at line 33 of file fastPD.hxx.

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

Definition at line 73 of file fastPD.hxx.

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

Definition at line 66 of file fastPD.hxx.

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

Definition at line 67 of file fastPD.hxx.

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

Definition at line 68 of file fastPD.hxx.

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

Definition at line 75 of file fastPD.hxx.