OpenGM  2.3.x
Discrete Graphical Model Library
Public Types | Public Member Functions | Public Attributes | List of all members
opengm::LPInferenceBase< LP_INFERENCE_TYPE >::Parameter Struct Reference

Parameter class for opengm::LPInferenceBase. More...

#include <lp_inference_base.hxx>

+ Inheritance diagram for opengm::LPInferenceBase< LP_INFERENCE_TYPE >::Parameter:
+ Collaboration diagram for opengm::LPInferenceBase< LP_INFERENCE_TYPE >::Parameter:

Public Types

enum  Relaxation { LocalPolytope, LoosePolytope, TightPolytope }
 This enum defines the type of the linear programming model which is used for inference. More...
 
enum  ChallengeHeuristic { Random, Weighted }
 This enum defines the heuristic by which the violated constraints are added to the LP/MIP model. More...
 

Public Member Functions

 Parameter ()
 Parameter constructor setting default value for all options. More...
 

Public Attributes

bool integerConstraintNodeVar_
 Use integer constraints for node variables. More...
 
bool integerConstraintFactorVar_
 Use integer constraints for factor variables. More...
 
bool useSoftConstraints_
 If constraint factors are present in the model add them as soft constraints e.g. treat them as normal factors. More...
 
bool useFunctionTransfer_
 Use function transfer if available to generate more efficient LP/MIP models. More...
 
bool mergeParallelFactors_
 Merge factors which are connected to the same set of variables. Might increase construction time but will result in a smaller LP/MIP model if parallel factors are present in the graphical model. More...
 
bool nameConstraints_
 Create unique names for the linear constraints added to the model (might be helpful for debugging models). More...
 
Relaxation relaxation_
 Selected relaxation method. More...
 
size_t maxNumIterations_
 Maximum number of tightening iterations (infinite if set to 0). More...
 
size_t maxNumConstraintsPerIter_
 Maximum number of violated constraints which are added per tightening iteration (all if set to 0). More...
 
ChallengeHeuristic challengeHeuristic_
 Heuristic on how to select violated constraints. More...
 
ValueType tolerance_
 Tolerance for violation of linear constraints. More...
 

Detailed Description

template<class LP_INFERENCE_TYPE>
struct opengm::LPInferenceBase< LP_INFERENCE_TYPE >::Parameter

Parameter class for opengm::LPInferenceBase.

Definition at line 63 of file lp_inference_base.hxx.

Member Enumeration Documentation

template<class LP_INFERENCE_TYPE>
enum opengm::LPInferenceBase::Parameter::ChallengeHeuristic

This enum defines the heuristic by which the violated constraints are added to the LP/MIP model.

Enumerator
Random 

Random will add violated constraints in a random order.

Weighted 

Weighted will add constraints sorted by their weights. This is only meaningful if the maximum number of violated constraints added per iteration is limited.

Definition at line 68 of file lp_inference_base.hxx.

template<class LP_INFERENCE_TYPE>
enum opengm::LPInferenceBase::Parameter::Relaxation

This enum defines the type of the linear programming model which is used for inference.

Enumerator
LocalPolytope 

LocalPolytope will use a first order local polytope approximation of the marginal polytope, i.e. the affine instead of the convex hull. All linear constraints given by linear constraint functions will be added iteratively only if they are violated.

LoosePolytope 

LoosePolytope will add no constraints at all. All linear constraints will be added iteratively only if they are violated.

TightPolytope 

TightPolytope will add all constraints of the LocalPolytope relaxation and furthermore all constraints that are present in the model via constraint functions. Thus all constraints will be added before the first run of inference which leads to solving the problem in only one iteration.

Definition at line 67 of file lp_inference_base.hxx.

Constructor & Destructor Documentation

template<class LP_INFERENCE_TYPE >
opengm::LPInferenceBase< LP_INFERENCE_TYPE >::Parameter::Parameter ( )
inline

Parameter constructor setting default value for all options.

Definition at line 1752 of file lp_inference_base.hxx.

Member Data Documentation

template<class LP_INFERENCE_TYPE>
opengm::LPInferenceBase< LP_INFERENCE_TYPE >::Parameter::challengeHeuristic_

Heuristic on how to select violated constraints.

Definition at line 82 of file lp_inference_base.hxx.

template<class LP_INFERENCE_TYPE>
opengm::LPInferenceBase< LP_INFERENCE_TYPE >::Parameter::integerConstraintFactorVar_

Use integer constraints for factor variables.

Definition at line 74 of file lp_inference_base.hxx.

template<class LP_INFERENCE_TYPE>
opengm::LPInferenceBase< LP_INFERENCE_TYPE >::Parameter::integerConstraintNodeVar_

Use integer constraints for node variables.

Definition at line 73 of file lp_inference_base.hxx.

template<class LP_INFERENCE_TYPE>
opengm::LPInferenceBase< LP_INFERENCE_TYPE >::Parameter::maxNumConstraintsPerIter_

Maximum number of violated constraints which are added per tightening iteration (all if set to 0).

Definition at line 81 of file lp_inference_base.hxx.

template<class LP_INFERENCE_TYPE>
opengm::LPInferenceBase< LP_INFERENCE_TYPE >::Parameter::maxNumIterations_

Maximum number of tightening iterations (infinite if set to 0).

Definition at line 80 of file lp_inference_base.hxx.

template<class LP_INFERENCE_TYPE>
opengm::LPInferenceBase< LP_INFERENCE_TYPE >::Parameter::mergeParallelFactors_

Merge factors which are connected to the same set of variables. Might increase construction time but will result in a smaller LP/MIP model if parallel factors are present in the graphical model.

Definition at line 77 of file lp_inference_base.hxx.

template<class LP_INFERENCE_TYPE>
opengm::LPInferenceBase< LP_INFERENCE_TYPE >::Parameter::nameConstraints_

Create unique names for the linear constraints added to the model (might be helpful for debugging models).

Definition at line 78 of file lp_inference_base.hxx.

template<class LP_INFERENCE_TYPE>
opengm::LPInferenceBase< LP_INFERENCE_TYPE >::Parameter::relaxation_

Selected relaxation method.

Definition at line 79 of file lp_inference_base.hxx.

template<class LP_INFERENCE_TYPE>
opengm::LPInferenceBase< LP_INFERENCE_TYPE >::Parameter::tolerance_

Tolerance for violation of linear constraints.

Definition at line 83 of file lp_inference_base.hxx.

template<class LP_INFERENCE_TYPE>
opengm::LPInferenceBase< LP_INFERENCE_TYPE >::Parameter::useFunctionTransfer_

Use function transfer if available to generate more efficient LP/MIP models.

Definition at line 76 of file lp_inference_base.hxx.

template<class LP_INFERENCE_TYPE>
opengm::LPInferenceBase< LP_INFERENCE_TYPE >::Parameter::useSoftConstraints_

If constraint factors are present in the model add them as soft constraints e.g. treat them as normal factors.

Definition at line 75 of file lp_inference_base.hxx.