Optimization by Linear Programming (LP) or Integer LP using IBM ILOG CPLEX
http://www.ilog.com/products/cplex/.
More...
#include <lpcplex.hxx>
Classes | |
class | Parameter |
Public Types | |
typedef ACC | AccumulationType |
typedef ACC | AccumulatorType |
typedef GM | GraphicalModelType |
typedef VerboseVisitor < LPCplex< GM, ACC > > | VerboseVisitorType |
typedef TimingVisitor< LPCplex < GM, ACC > > | TimingVisitorType |
typedef EmptyVisitor< LPCplex < GM, ACC > > | EmptyVisitorType |
Public Member Functions | |
LPCplex (const GraphicalModelType &, const Parameter &=Parameter()) | |
~LPCplex () | |
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 | |
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 | |
GM::ValueType | value () const |
return the solution (value) | |
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 &) |
add cosntraint | |
template<class LABELING_ITERATOR > | |
size_t | lpFactorVi (const typename LPCplex< GM, ACC >::IndexType factorIndex, LABELING_ITERATOR labelingBegin, LABELING_ITERATOR labelingEnd) const |
Public Attributes | |
OPENGM_GM_TYPE_TYPEDEFS |
Optimization by Linear Programming (LP) or Integer LP using IBM ILOG CPLEX
http://www.ilog.com/products/cplex/.
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.
IBM ILOG CPLEX is a commercial product that is free for accadamical use.
Definition at line 37 of file lpcplex.hxx.
typedef ACC opengm::LPCplex< GM, ACC >::AccumulationType |
Reimplemented from opengm::Inference< GM, ACC >.
Definition at line 39 of file lpcplex.hxx.
typedef ACC opengm::LPCplex< GM, ACC >::AccumulatorType |
Definition at line 40 of file lpcplex.hxx.
typedef EmptyVisitor< LPCplex<GM, ACC> > opengm::LPCplex< GM, ACC >::EmptyVisitorType |
Definition at line 45 of file lpcplex.hxx.
typedef GM opengm::LPCplex< GM, ACC >::GraphicalModelType |
Reimplemented from opengm::Inference< GM, ACC >.
Definition at line 41 of file lpcplex.hxx.
typedef TimingVisitor<LPCplex<GM, ACC> > opengm::LPCplex< GM, ACC >::TimingVisitorType |
Definition at line 44 of file lpcplex.hxx.
typedef VerboseVisitor<LPCplex<GM, ACC> > opengm::LPCplex< GM, ACC >::VerboseVisitorType |
Definition at line 43 of file lpcplex.hxx.
opengm::LPCplex< GM, ACC >::LPCplex | ( | const GraphicalModelType & | gm, | |
const Parameter & | para = Parameter() | |||
) | [inline] |
opengm::LPCplex< GM, ACC >::~LPCplex | ( | ) | [inline] |
Definition at line 354 of file lpcplex.hxx.
void opengm::LPCplex< GM, ACC >::addConstraint | ( | LPVariableIndexIterator | viBegin, | |
LPVariableIndexIterator | viEnd, | |||
CoefficientIterator | coefficient, | |||
const ValueType & | lowerBound, | |||
const ValueType & | upperBound | |||
) | [inline] |
add cosntraint
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 LPCplex (NOT to the variables of the graphical model).
Definition at line 510 of file lpcplex.hxx.
virtual InferenceTermination opengm::LPCplex< GM, ACC >::arg | ( | std::vector< LabelType > & | arg, | |
const | argIndex = 1 | |||
) | const [virtual] |
output a solution
[out] | arg | labeling |
argIndex | solution index (0=best, 1=second best, etc.) |
Reimplemented from opengm::Inference< GM, ACC >.
virtual InferenceTermination opengm::LPCplex< GM, ACC >::args | ( | std::vector< std::vector< LabelType > > & | ) | const [inline, virtual] |
Reimplemented from opengm::Inference< GM, ACC >.
Definition at line 100 of file lpcplex.hxx.
GM::ValueType opengm::LPCplex< GM, ACC >::bound | ( | ) | const [inline, virtual] |
return a bound on the solution
Reimplemented from opengm::Inference< GM, ACC >.
Definition at line 436 of file lpcplex.hxx.
void opengm::LPCplex< GM, ACC >::factorVariable | ( | const size_t | factorId, | |
IndependentFactorType & | out | |||
) | const [inline] |
Definition at line 397 of file lpcplex.hxx.
const LPCplex< GM, ACC >::GraphicalModelType & opengm::LPCplex< GM, ACC >::graphicalModel | ( | ) | const [inline, virtual] |
Implements opengm::Inference< GM, ACC >.
Definition at line 423 of file lpcplex.hxx.
InferenceTermination opengm::LPCplex< GM, ACC >::infer | ( | VisitorType & | visitor | ) | [inline] |
Definition at line 298 of file lpcplex.hxx.
InferenceTermination opengm::LPCplex< GM, ACC >::infer | ( | ) | [inline, virtual] |
Implements opengm::Inference< GM, ACC >.
Definition at line 289 of file lpcplex.hxx.
size_t opengm::LPCplex< GM, ACC >::lpFactorVi | ( | const typename LPCplex< GM, ACC >::IndexType | factorIndex, | |
LABELING_ITERATOR | labelingBegin, | |||
LABELING_ITERATOR | labelingEnd | |||
) | const [inline] |
Definition at line 476 of file lpcplex.hxx.
size_t opengm::LPCplex< GM, ACC >::lpFactorVi | ( | const IndexType | factorIndex, | |
LABELING_ITERATOR | labelingBegin, | |||
LABELING_ITERATOR | labelingEnd | |||
) | const [inline] |
size_t opengm::LPCplex< GM, ACC >::lpFactorVi | ( | const IndexType | factorIndex, | |
const size_t | labelingIndex | |||
) | const |
size_t opengm::LPCplex< GM, ACC >::lpNodeVi | ( | const IndexType | variableIndex, | |
const LabelType | label | |||
) | const |
virtual std::string opengm::LPCplex< GM, ACC >::name | ( | ) | const [inline, virtual] |
Implements opengm::Inference< GM, ACC >.
Definition at line 93 of file lpcplex.hxx.
GM::ValueType opengm::LPCplex< GM, ACC >::value | ( | ) | const [inline, virtual] |
return the solution (value)
Reimplemented from opengm::Inference< GM, ACC >.
Definition at line 429 of file lpcplex.hxx.
void opengm::LPCplex< GM, ACC >::variable | ( | const size_t | nodeId, | |
IndependentFactorType & | out | |||
) | const [inline] |
Definition at line 382 of file lpcplex.hxx.
opengm::LPCplex< GM, ACC >::OPENGM_GM_TYPE_TYPEDEFS |
Definition at line 42 of file lpcplex.hxx.