OpenGM  2.3.x
Discrete Graphical Model Library
lpgurobi2.hxx
Go to the documentation of this file.
1 #ifndef OPENGM_LPGUROBI2_HXX_
2 #define OPENGM_LPGUROBI2_HXX_
3 
6 
7 namespace opengm {
8 
9 /********************
10  * class definition *
11  *******************/
12 template<class GM_TYPE, class ACC_TYPE>
13 class LPGurobi2 : public LPSolverGurobi, public LPInferenceBase<LPGurobi2<GM_TYPE, ACC_TYPE> > {
14 public:
15  // typedefs
16  typedef ACC_TYPE AccumulationType;
17  typedef GM_TYPE GraphicalModelType;
21 
22  // construction
23  LPGurobi2(const GraphicalModelType& gm, const Parameter& parameter = Parameter());
24  virtual ~LPGurobi2();
25 
26  // public member functions
27  virtual std::string name() const;
28 };
29 
30 template<class GM_TYPE, class ACC_TYPE>
31 struct LPInferenceTraits<LPGurobi2<GM_TYPE, ACC_TYPE> > {
32  // typedefs
33  typedef ACC_TYPE AccumulationType;
34  typedef GM_TYPE GraphicalModelType;
40  typedef typename LPSolverGurobi::Parameter SolverParameterType;
41 };
42 
43 /***********************
44  * class documentation *
45  **********************/
98 /******************
99  * implementation *
100  *****************/
101 template<class GM_TYPE, class ACC_TYPE>
102 inline LPGurobi2<GM_TYPE, ACC_TYPE>::LPGurobi2(const GraphicalModelType& gm, const Parameter& parameter)
103  : LPSolverGurobi(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 LPGurobi2<GM_TYPE, ACC_TYPE>::name() const {
114  return "LPGurobi2";
115 }
116 
117 } // namespace opengm
118 
119 #endif /* OPENGM_LPGUROBI2_HXX_ */
LPInferenceBaseType::Parameter Parameter
Typedef of the parameter type defined by class opengm::LPInferenceBase.
Definition: lpgurobi2.hxx:20
The OpenGM namespace.
Definition: config.hxx:43
Base class for Linear Programming based inference.
Wrapper class for the Gurobi optimizer.
GM_TYPE GraphicalModelType
Typedef of the graphical model type.
Definition: lpgurobi2.hxx:17
LPGurobi2(const GraphicalModelType &gm, const Parameter &parameter=Parameter())
LPGurobi2 constructor.
Definition: lpgurobi2.hxx:102
virtual std::string name() const
Name of the inference method.
Definition: lpgurobi2.hxx:113
double GurobiTimingType
Defines the timing type used by Gurobi.
int GurobiIndexType
Defines the index type used by Gurobi.
std::vector< GurobiValueType >::const_iterator GurobiSolutionIteratorType
Defines the iterator type which can be used to iterate over the solution of Gurobi.
double GurobiValueType
Defines the value type used by Gurobi.
LPSolverGurobi::GurobiSolutionIteratorType SolverSolutionIteratorType
Definition: lpgurobi2.hxx:38
Parameter class for opengm::LPInferenceBase.
virtual ~LPGurobi2()
LPGurobi2 destructor.
Definition: lpgurobi2.hxx:108
Traits class for lp inference classes.
ACC_TYPE AccumulationType
Typedef of the Accumulation type.
Definition: lpgurobi2.hxx:16
LPInferenceBase< LPGurobi2< GraphicalModelType, AccumulationType > > LPInferenceBaseType
Typedef of class opengm::LPInferenceBase with appropriate template parameter.
Definition: lpgurobi2.hxx:19
Provides wrapper class for LP Solver Gurobi.
LP inference with Gurobi.
Definition: lpgurobi2.hxx:13
Provides implementation of a base class for LP inference.