OpenGM  2.3.x
Discrete Graphical Model Library
lpcplex2.hxx
Go to the documentation of this file.
1 #ifndef OPENGM_LPCPLEX2_HXX_
2 #define OPENGM_LPCPLEX2_HXX_
3 
6 
7 namespace opengm {
8 
9 /********************
10  * class definition *
11  *******************/
12 template<class GM_TYPE, class ACC_TYPE>
13 class LPCplex2 : public LPSolverCplex, public LPInferenceBase<LPCplex2<GM_TYPE, ACC_TYPE> > {
14 public:
15  // typedefs
16  typedef ACC_TYPE AccumulationType;
17  typedef GM_TYPE GraphicalModelType;
21 
22  // construction
23  LPCplex2(const GraphicalModelType& gm, const Parameter& parameter = Parameter());
24  virtual ~LPCplex2();
25 
26  // public member functions
27  virtual std::string name() const;
28 };
29 
30 template<class GM_TYPE, class ACC_TYPE>
31 struct LPInferenceTraits<LPCplex2<GM_TYPE, ACC_TYPE> > {
32  // typedefs
33  typedef ACC_TYPE AccumulationType;
34  typedef GM_TYPE GraphicalModelType;
40  typedef typename LPSolverCplex::Parameter SolverParameterType;
41 };
42 
43 /***********************
44  * class documentation *
45  **********************/
98 /******************
99  * implementation *
100  *****************/
101 template<class GM_TYPE, class ACC_TYPE>
102 inline LPCplex2<GM_TYPE, ACC_TYPE>::LPCplex2(const GraphicalModelType& gm, const Parameter& parameter)
103  : LPSolverCplex(parameter), LPInferenceBaseType(gm, parameter) {
104 
105 }
106 
107 template<class GM_TYPE, class ACC_TYPE>
109 
110 }
111 
112 template<class GM_TYPE, class ACC_TYPE>
113 inline std::string LPCplex2<GM_TYPE, ACC_TYPE>::name() const {
114  return "LPCplex2";
115 }
116 
117 } // namespace opengm
118 
119 #endif /* OPENGM_LPCPLEX2_HXX_ */
virtual ~LPCplex2()
LPCplex2 destructor.
Definition: lpcplex2.hxx:108
The OpenGM namespace.
Definition: config.hxx:43
Base class for Linear Programming based inference.
LPCplex2(const GraphicalModelType &gm, const Parameter &parameter=Parameter())
LPCplex2 constructor.
Definition: lpcplex2.hxx:102
LP inference with CPLEX.
Definition: lpcplex2.hxx:13
IloInt CplexIndexType
Defines the index type used by CPLEX.
LPInferenceBaseType::Parameter Parameter
Typedef of the parameter type defined by class opengm::LPInferenceBase.
Definition: lpcplex2.hxx:20
IloNum CplexTimingType
Defines the timing type used by CPLEX.
Wrapper class for the IBM ILOG CPLEX optimizer.
IloNum CplexValueType
Defines the value type used by CPLEX.
Provides wrapper class for LP Solver CPLEX.
LPSolverCplex::CplexSolutionIteratorType SolverSolutionIteratorType
Definition: lpcplex2.hxx:38
Iterator to iterate over an array of type IloNumArray.
GM_TYPE GraphicalModelType
Typedef of the graphical model type.
Definition: lpcplex2.hxx:17
Parameter class for opengm::LPInferenceBase.
LPInferenceBase< LPCplex2< GraphicalModelType, AccumulationType > > LPInferenceBaseType
Typedef of class opengm::LPInferenceBase with appropriate template parameter.
Definition: lpcplex2.hxx:19
Traits class for lp inference classes.
ACC_TYPE AccumulationType
Typedef of the Accumulation type.
Definition: lpcplex2.hxx:16
virtual std::string name() const
Name of the inference method.
Definition: lpcplex2.hxx:113
Provides implementation of a base class for LP inference.