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

#include <smoothing_strategy.hxx>

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

Public Types

typedef Inference< GM, ACC > parent
 
typedef ACC AccumulationType
 
typedef GM GraphicalModelType
 
typedef trws_base::DecompositionStorage< GM > Storage
 
typedef trws_base::SumProdTRWS< GM, ACC > SumProdSolver
 
typedef trws_base::MaxSumTRWS< GM, ACC > MaxSumSolver
 
typedef PrimalLPBound< GM, ACC > PrimalBoundEstimator
 
typedef TRWS_Reparametrizer< Storage, ACC > ReparametrizerType
 
typedef SmoothingStrategy< GM, ACC > SmoothingStrategyType
 
typedef SmoothingBasedInference_Parameter< GM > Parameter
 
- 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

 SmoothingBasedInference (const GraphicalModelType &gm, const Parameter &param)
 
virtual ~SmoothingBasedInference ()
 
InferenceTermination arg (std::vector< LabelType > &out, const size_t=1) const
 output a solution More...
 
const GraphicalModelTypegraphicalModel () const
 
ValueType bound () const
 return a bound on the solution More...
 
ValueType value () const
 return the solution (value) More...
 
ValueType UpdateSmoothDualEstimates (ValueType smoothingValue, ValueType *pderivativeValue)
 
void getTreeAgreement (std::vector< bool > &out, std::vector< LabelType > *plabeling=0, std::vector< std::vector< LabelType > > *ptreeLabelings=0)
 
StoragegetDecompositionStorage ()
 
const MaxSumSolver::FactorPropertiesgetFactorProperties () const
 
ReparametrizerTypegetReparametrizer (const typename ReparametrizerType::Parameter &params=typename ReparametrizerType::Parameter())
 
InferenceTermination marginal (const IndexType varID, IndependentFactorType &out)
 
template<class VISITOR >
opengm::InferenceTermination _Presolve (VISITOR &visitor, size_t *piterCounter)
 
- Public Member Functions inherited from opengm::Inference< GM, ACC >
virtual ~Inference ()
 
virtual std::string name () const =0
 
virtual InferenceTermination infer ()=0
 
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...
 
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

template<class VISITOR >
InferenceTermination _Presolve (VISITOR &visitor, size_t *piterCounter=0)
 
template<class VISITOR >
size_t _EstimateStartingSmoothing (VISITOR &visitor)
 
bool _UpdateSmoothing (ValueType primalBound, ValueType dualBound, ValueType smoothDualBound, ValueType derivativeValue, size_t iterationCounterPlus1=0)
 

returns number of oracle calls;

More...
 
ValueType _EstimateRhoDerivative () const
 
ValueType _FastEstimateRhoDerivative () const
 
void _UpdatePrimalEstimator ()
 
void _SelectOptimalBoundsAndLabeling ()
 
bool _isLPBoundComputed () const
 
bool _CheckStoppingCondition (InferenceTermination *)
 

Protected Attributes

Parameter _parameters
 
Storage _storage
 
SumProdSolver _sumprodsolver
 
MaxSumSolver _maxsumsolver
 
PrimalBoundEstimator _estimator
 
ValueType _bestPrimalLPbound
 
ValueType _bestPrimalBound
 
ValueType _bestDualBound
 
ValueType _bestIntegerBound
 
std::vector< LabelType_bestIntegerLabeling
 
SmoothingStrategyTypepsmoothingStrategy
 
SumProdSolver::OutputContainerType _marginalsTemp
 

Detailed Description

template<class GM, class ACC>
class opengm::trws_base::SmoothingBasedInference< GM, ACC >

Definition at line 260 of file smoothing_strategy.hxx.

Member Typedef Documentation

template<class GM, class ACC>
typedef ACC opengm::trws_base::SmoothingBasedInference< GM, ACC >::AccumulationType

Definition at line 523 of file smoothing_strategy.hxx.

template<class GM, class ACC>
typedef GM opengm::trws_base::SmoothingBasedInference< GM, ACC >::GraphicalModelType

Definition at line 524 of file smoothing_strategy.hxx.

template<class GM, class ACC>
typedef trws_base::MaxSumTRWS<GM,ACC> opengm::trws_base::SmoothingBasedInference< GM, ACC >::MaxSumSolver

Definition at line 529 of file smoothing_strategy.hxx.

template<class GM, class ACC>
typedef SmoothingBasedInference_Parameter<GM> opengm::trws_base::SmoothingBasedInference< GM, ACC >::Parameter

Definition at line 536 of file smoothing_strategy.hxx.

template<class GM, class ACC>
typedef Inference<GM, ACC> opengm::trws_base::SmoothingBasedInference< GM, ACC >::parent

Definition at line 522 of file smoothing_strategy.hxx.

template<class GM, class ACC>
typedef PrimalLPBound<GM,ACC> opengm::trws_base::SmoothingBasedInference< GM, ACC >::PrimalBoundEstimator

Definition at line 530 of file smoothing_strategy.hxx.

template<class GM, class ACC>
typedef TRWS_Reparametrizer<Storage,ACC> opengm::trws_base::SmoothingBasedInference< GM, ACC >::ReparametrizerType

Definition at line 533 of file smoothing_strategy.hxx.

template<class GM, class ACC>
typedef SmoothingStrategy<GM,ACC> opengm::trws_base::SmoothingBasedInference< GM, ACC >::SmoothingStrategyType

Definition at line 534 of file smoothing_strategy.hxx.

template<class GM, class ACC>
typedef trws_base::DecompositionStorage<GM> opengm::trws_base::SmoothingBasedInference< GM, ACC >::Storage

Definition at line 527 of file smoothing_strategy.hxx.

template<class GM, class ACC>
typedef trws_base::SumProdTRWS<GM,ACC> opengm::trws_base::SmoothingBasedInference< GM, ACC >::SumProdSolver

Definition at line 528 of file smoothing_strategy.hxx.

Constructor & Destructor Documentation

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

Definition at line 538 of file smoothing_strategy.hxx.

+ Here is the call graph for this function:

template<class GM, class ACC>
virtual opengm::trws_base::SmoothingBasedInference< GM, ACC >::~SmoothingBasedInference ( )
inlinevirtual

Definition at line 613 of file smoothing_strategy.hxx.

Member Function Documentation

template<class GM , class ACC >
bool opengm::trws_base::SmoothingBasedInference< GM, ACC >::_CheckStoppingCondition ( InferenceTermination preturncode)
protected

Definition at line 796 of file smoothing_strategy.hxx.

template<class GM , class ACC >
SmoothingBasedInference< GM, ACC >::ValueType opengm::trws_base::SmoothingBasedInference< GM, ACC >::_EstimateRhoDerivative ( ) const
protected

Definition at line 712 of file smoothing_strategy.hxx.

template<class GM , class ACC >
template<class VISITOR >
size_t opengm::trws_base::SmoothingBasedInference< GM, ACC >::_EstimateStartingSmoothing ( VISITOR &  visitor)
protected

Definition at line 690 of file smoothing_strategy.hxx.

template<class GM, class ACC>
ValueType opengm::trws_base::SmoothingBasedInference< GM, ACC >::_FastEstimateRhoDerivative ( ) const
inlineprotected

Definition at line 648 of file smoothing_strategy.hxx.

+ Here is the call graph for this function:

template<class GM , class ACC >
bool opengm::trws_base::SmoothingBasedInference< GM, ACC >::_isLPBoundComputed ( ) const
protected

Definition at line 790 of file smoothing_strategy.hxx.

template<class GM, class ACC>
template<class VISITOR >
InferenceTermination opengm::trws_base::SmoothingBasedInference< GM, ACC >::_Presolve ( VISITOR &  visitor,
size_t piterCounter = 0 
)
protected
template<class GM, class ACC>
template<class VISITOR >
opengm::InferenceTermination opengm::trws_base::SmoothingBasedInference< GM, ACC >::_Presolve ( VISITOR &  visitor,
size_t piterCounter 
)

Definition at line 781 of file smoothing_strategy.hxx.

template<class GM , class ACC >
void opengm::trws_base::SmoothingBasedInference< GM, ACC >::_SelectOptimalBoundsAndLabeling ( )
protected

Definition at line 752 of file smoothing_strategy.hxx.

template<class GM , class ACC >
void opengm::trws_base::SmoothingBasedInference< GM, ACC >::_UpdatePrimalEstimator ( )
protected

remove what is less than the precision

Definition at line 729 of file smoothing_strategy.hxx.

+ Here is the call graph for this function:

template<class GM , class ACC >
bool opengm::trws_base::SmoothingBasedInference< GM, ACC >::_UpdateSmoothing ( ValueType  primalBound,
ValueType  dualBound,
ValueType  smoothDualBound,
ValueType  derivativeValue,
size_t  iterationCounterPlus1 = 0 
)
protected

returns number of oracle calls;

Definition at line 698 of file smoothing_strategy.hxx.

template<class GM, class ACC>
InferenceTermination opengm::trws_base::SmoothingBasedInference< 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 615 of file smoothing_strategy.hxx.

template<class GM, class ACC>
ValueType opengm::trws_base::SmoothingBasedInference< GM, ACC >::bound ( ) const
inlinevirtual

return a bound on the solution

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

Definition at line 620 of file smoothing_strategy.hxx.

template<class GM, class ACC>
Storage& opengm::trws_base::SmoothingBasedInference< GM, ACC >::getDecompositionStorage ( )
inline

Definition at line 626 of file smoothing_strategy.hxx.

template<class GM, class ACC>
const MaxSumSolver::FactorProperties& opengm::trws_base::SmoothingBasedInference< GM, ACC >::getFactorProperties ( ) const
inline

Definition at line 627 of file smoothing_strategy.hxx.

+ Here is the call graph for this function:

template<class GM, class ACC>
ReparametrizerType* opengm::trws_base::SmoothingBasedInference< GM, ACC >::getReparametrizer ( const typename ReparametrizerType::Parameter params = typename ReparametrizerType::Parameter())
inline

Definition at line 629 of file smoothing_strategy.hxx.

+ Here is the call graph for this function:

template<class GM, class ACC>
void opengm::trws_base::SmoothingBasedInference< GM, ACC >::getTreeAgreement ( std::vector< bool > &  out,
std::vector< LabelType > *  plabeling = 0,
std::vector< std::vector< LabelType > > *  ptreeLabelings = 0 
)
inline

Definition at line 625 of file smoothing_strategy.hxx.

+ Here is the call graph for this function:

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

Implements opengm::Inference< GM, ACC >.

Definition at line 618 of file smoothing_strategy.hxx.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class GM, class ACC>
InferenceTermination opengm::trws_base::SmoothingBasedInference< GM, ACC >::marginal ( const IndexType  varID,
IndependentFactorType out 
)
inline

Definition at line 632 of file smoothing_strategy.hxx.

+ Here is the call graph for this function:

template<class GM , class ACC >
SmoothingBasedInference< GM, ACC >::ValueType opengm::trws_base::SmoothingBasedInference< GM, ACC >::UpdateSmoothDualEstimates ( ValueType  smoothingValue,
ValueType pderivativeValue 
)

Definition at line 679 of file smoothing_strategy.hxx.

+ Here is the caller graph for this function:

template<class GM, class ACC>
ValueType opengm::trws_base::SmoothingBasedInference< GM, ACC >::value ( ) const
inlinevirtual

return the solution (value)

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

Definition at line 621 of file smoothing_strategy.hxx.

Member Data Documentation

template<class GM, class ACC>
ValueType opengm::trws_base::SmoothingBasedInference< GM, ACC >::_bestDualBound
protected

Definition at line 665 of file smoothing_strategy.hxx.

template<class GM, class ACC>
ValueType opengm::trws_base::SmoothingBasedInference< GM, ACC >::_bestIntegerBound
protected

Definition at line 666 of file smoothing_strategy.hxx.

template<class GM, class ACC>
std::vector<LabelType> opengm::trws_base::SmoothingBasedInference< GM, ACC >::_bestIntegerLabeling
protected

Definition at line 667 of file smoothing_strategy.hxx.

template<class GM, class ACC>
ValueType opengm::trws_base::SmoothingBasedInference< GM, ACC >::_bestPrimalBound
protected

Definition at line 663 of file smoothing_strategy.hxx.

template<class GM, class ACC>
ValueType opengm::trws_base::SmoothingBasedInference< GM, ACC >::_bestPrimalLPbound
protected

Definition at line 662 of file smoothing_strategy.hxx.

template<class GM, class ACC>
PrimalBoundEstimator opengm::trws_base::SmoothingBasedInference< GM, ACC >::_estimator
protected

Definition at line 658 of file smoothing_strategy.hxx.

template<class GM, class ACC>
SumProdSolver::OutputContainerType opengm::trws_base::SmoothingBasedInference< GM, ACC >::_marginalsTemp
protected

Definition at line 674 of file smoothing_strategy.hxx.

template<class GM, class ACC>
MaxSumSolver opengm::trws_base::SmoothingBasedInference< GM, ACC >::_maxsumsolver
protected

Definition at line 657 of file smoothing_strategy.hxx.

template<class GM, class ACC>
Parameter opengm::trws_base::SmoothingBasedInference< GM, ACC >::_parameters
protected

Definition at line 654 of file smoothing_strategy.hxx.

template<class GM, class ACC>
Storage opengm::trws_base::SmoothingBasedInference< GM, ACC >::_storage
protected

Definition at line 655 of file smoothing_strategy.hxx.

template<class GM, class ACC>
SumProdSolver opengm::trws_base::SmoothingBasedInference< GM, ACC >::_sumprodsolver
protected

Definition at line 656 of file smoothing_strategy.hxx.

template<class GM, class ACC>
opengm::trws_base::SmoothingBasedInference< GM, ACC >::OPENGM_GM_TYPE_TYPEDEFS

Definition at line 525 of file smoothing_strategy.hxx.

template<class GM, class ACC>
SmoothingStrategyType* opengm::trws_base::SmoothingBasedInference< GM, ACC >::psmoothingStrategy
protected

Definition at line 669 of file smoothing_strategy.hxx.