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  template<class _GM>
30  struct RebindGm{
32  };
33 
34  template<class _GM,class _ACC>
37  };
38 };
39 
40 template<class GM_TYPE, class ACC_TYPE>
41 struct LPInferenceTraits<LPCplex2<GM_TYPE, ACC_TYPE> > {
42  // typedefs
43  typedef ACC_TYPE AccumulationType;
44  typedef GM_TYPE GraphicalModelType;
50  typedef typename LPSolverCplex::Parameter SolverParameterType;
51 };
52 
53 /***********************
54  * class documentation *
55  **********************/
108 /******************
109  * implementation *
110  *****************/
111 template<class GM_TYPE, class ACC_TYPE>
112 inline LPCplex2<GM_TYPE, ACC_TYPE>::LPCplex2(const GraphicalModelType& gm, const Parameter& parameter)
113  : LPSolverCplex(parameter), LPInferenceBaseType(gm, parameter) {
114 
115 }
116 
117 template<class GM_TYPE, class ACC_TYPE>
119 
120 }
121 
122 template<class GM_TYPE, class ACC_TYPE>
123 inline std::string LPCplex2<GM_TYPE, ACC_TYPE>::name() const {
124  return "LPCplex2";
125 }
126 
127 } // namespace opengm
128 
129 #endif /* OPENGM_LPCPLEX2_HXX_ */
virtual ~LPCplex2()
LPCplex2 destructor.
Definition: lpcplex2.hxx:118
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:112
LPCplex2< _GM, ACC_TYPE > type
Definition: lpcplex2.hxx:31
LPCplex2< _GM, _ACC > type
Definition: lpcplex2.hxx:36
LP inference with CPLEX.
Definition: lpcplex2.hxx:13
IloInt CplexIndexType
Defines the index type used by CPLEX.
virtual std::string name() const
Name of the inference method.
Definition: lpcplex2.hxx:123
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:48
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
Provides implementation of a base class for LP inference.