|
OpenGM
2.3.x
Discrete Graphical Model Library
|
Optimization by Linear Programming (LP) or Integer LP using Guroi
http://www.gurobi.com.
More...
#include <lpgurobi.hxx>
Inheritance diagram for opengm::LPGurobi< GM, ACC >:
Collaboration diagram for opengm::LPGurobi< GM, ACC >:Classes | |
| class | Parameter |
| struct | RebindGm |
| struct | RebindGmAndAcc |
Public Member Functions | |
| LPGurobi (const GraphicalModelType &, const Parameter &=Parameter()) | |
| ~LPGurobi () | |
| virtual std::string | name () const |
| const GraphicalModelType & | graphicalModel () const |
| virtual InferenceTermination | infer () |
| template<class VisitorType > | |
| InferenceTermination | infer (VisitorType &) |
| virtual InferenceTermination | arg (std::vector< LabelType > &, const size_t=1) const |
| output a solution More... | |
| virtual InferenceTermination | args (std::vector< std::vector< LabelType > > &) const |
| void | variable (const size_t, IndependentFactorType &out) const |
| void | factorVariable (const size_t, IndependentFactorType &out) const |
| GM::ValueType | bound () const |
| return a bound on the solution More... | |
| GM::ValueType | value () const |
| return the solution (value) More... | |
| size_t | lpNodeVi (const IndexType variableIndex, const LabelType label) const |
| size_t | lpFactorVi (const IndexType factorIndex, const size_t labelingIndex) const |
| template<class LABELING_ITERATOR > | |
| size_t | lpFactorVi (const IndexType factorIndex, LABELING_ITERATOR labelingBegin, LABELING_ITERATOR labelingEnd) const |
| template<class LPVariableIndexIterator , class CoefficientIterator > | |
| void | addConstraint (LPVariableIndexIterator, LPVariableIndexIterator, CoefficientIterator, const ValueType &, const ValueType &, const char *name=0) |
| add constraint More... | |
| void | writeModelToDisk (const std::string &filename) const |
| template<class LABELING_ITERATOR > | |
| size_t | lpFactorVi (const typename LPGurobi< GM, ACC >::IndexType factorIndex, LABELING_ITERATOR labelingBegin, LABELING_ITERATOR labelingEnd) const |
Public Member Functions inherited from opengm::Inference< GM, ACC > | |
| virtual | ~Inference () |
| virtual void | setStartingPoint (typename std::vector< LabelType >::const_iterator) |
| set initial labeling More... | |
| 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 | |
Optimization by Linear Programming (LP) or Integer LP using Guroi
http://www.gurobi.com.
The optimization problem is reformulated as an LP or ILP. For the LP, a first order local polytope approximation of the marginal polytope is used, i.e. the affine instead of the convex hull.
Gurobi is a commercial product that is free for accadamical use.
Definition at line 38 of file lpgurobi.hxx.
| typedef ACC opengm::LPGurobi< GM, ACC >::AccumulationType |
Definition at line 40 of file lpgurobi.hxx.
| typedef ACC opengm::LPGurobi< GM, ACC >::AccumulatorType |
Definition at line 41 of file lpgurobi.hxx.
| typedef visitors::EmptyVisitor< LPGurobi<GM, ACC> > opengm::LPGurobi< GM, ACC >::EmptyVisitorType |
Definition at line 46 of file lpgurobi.hxx.
| typedef GM opengm::LPGurobi< GM, ACC >::GraphicalModelType |
Definition at line 42 of file lpgurobi.hxx.
| typedef visitors::TimingVisitor<LPGurobi<GM, ACC> > opengm::LPGurobi< GM, ACC >::TimingVisitorType |
Definition at line 45 of file lpgurobi.hxx.
| typedef visitors::VerboseVisitor<LPGurobi<GM, ACC> > opengm::LPGurobi< GM, ACC >::VerboseVisitorType |
Definition at line 44 of file lpgurobi.hxx.
| opengm::LPGurobi< GM, ACC >::LPGurobi | ( | const GraphicalModelType & | gm, |
| const Parameter & | para = Parameter() |
||
| ) |
Definition at line 263 of file lpgurobi.hxx.
Here is the call graph for this function:
Here is the caller graph for this function:| opengm::LPGurobi< GM, ACC >::~LPGurobi | ( | ) |
Definition at line 703 of file lpgurobi.hxx.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
add constraint
| viBegin | iterator to the beginning of a sequence of variable indices |
| viEnd | iterator to the end of a sequence of variable indices |
| coefficient | iterator to the beginning of a sequence of coefficients |
| lowerBound | lower bound |
| upperBound | upper bound |
variable indices refer to variables of the LP that is set up in the constructor of LPGurobi (NOT to the variables of the graphical model).
Definition at line 874 of file lpgurobi.hxx.
Here is the caller graph for this function:
|
inlinevirtual |
output a solution
| [out] | arg | labeling |
| argIndex | solution index (1=best, 2=second best, etc.) |
Reimplemented from opengm::Inference< GM, ACC >.
Definition at line 711 of file lpgurobi.hxx.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinevirtual |
Reimplemented from opengm::Inference< GM, ACC >.
Definition at line 202 of file lpgurobi.hxx.
Here is the call graph for this function:
|
virtual |
return a bound on the solution
Reimplemented from opengm::Inference< GM, ACC >.
Definition at line 798 of file lpgurobi.hxx.
Here is the call graph for this function:
Here is the caller graph for this function:| void opengm::LPGurobi< GM, ACC >::factorVariable | ( | const size_t | factorId, |
| IndependentFactorType & | out | ||
| ) | const |
Definition at line 758 of file lpgurobi.hxx.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinevirtual |
Implements opengm::Inference< GM, ACC >.
Definition at line 785 of file lpgurobi.hxx.
Here is the caller graph for this function:
|
virtual |
Implements opengm::Inference< GM, ACC >.
Definition at line 662 of file lpgurobi.hxx.
Here is the caller graph for this function:| InferenceTermination opengm::LPGurobi< GM, ACC >::infer | ( | VisitorType & | visitor | ) |
Definition at line 671 of file lpgurobi.hxx.
| size_t opengm::LPGurobi< GM, ACC >::lpFactorVi | ( | const IndexType | factorIndex, |
| const size_t | labelingIndex | ||
| ) | const |
Here is the caller graph for this function:| size_t opengm::LPGurobi< GM, ACC >::lpFactorVi | ( | const IndexType | factorIndex, |
| LABELING_ITERATOR | labelingBegin, | ||
| LABELING_ITERATOR | labelingEnd | ||
| ) | const |
|
inline |
Definition at line 840 of file lpgurobi.hxx.
|
inline |
Definition at line 813 of file lpgurobi.hxx.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinevirtual |
Implements opengm::Inference< GM, ACC >.
Definition at line 195 of file lpgurobi.hxx.
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
return the solution (value)
Reimplemented from opengm::Inference< GM, ACC >.
Definition at line 791 of file lpgurobi.hxx.
Here is the call graph for this function:
Here is the caller graph for this function:| void opengm::LPGurobi< GM, ACC >::variable | ( | const size_t | nodeId, |
| IndependentFactorType & | out | ||
| ) | const |
Definition at line 741 of file lpgurobi.hxx.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
| opengm::LPGurobi< GM, ACC >::OPENGM_GM_TYPE_TYPEDEFS |
Definition at line 43 of file lpgurobi.hxx.
1.8.12