opengm::LPCplex< GM, ACC > Class Template Reference
[Inference Algorithms]

Optimization by Linear Programming (LP) or Integer LP using IBM ILOG CPLEX

http://www.ilog.com/products/cplex/. More...

#include <lpcplex.hxx>

Inheritance diagram for opengm::LPCplex< GM, ACC >:
Inheritance graph
[legend]
Collaboration diagram for opengm::LPCplex< GM, ACC >:
Collaboration graph
[legend]

List of all members.

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 GraphicalModelTypegraphicalModel () 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

Detailed Description

template<class GM, class ACC>
class opengm::LPCplex< GM, ACC >

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.


Member Typedef Documentation

template<class GM, class ACC>
typedef ACC opengm::LPCplex< GM, ACC >::AccumulationType

Reimplemented from opengm::Inference< GM, ACC >.

Definition at line 39 of file lpcplex.hxx.

template<class GM, class ACC>
typedef ACC opengm::LPCplex< GM, ACC >::AccumulatorType

Definition at line 40 of file lpcplex.hxx.

template<class GM, class ACC>
typedef EmptyVisitor< LPCplex<GM, ACC> > opengm::LPCplex< GM, ACC >::EmptyVisitorType

Definition at line 45 of file lpcplex.hxx.

template<class GM, class ACC>
typedef GM opengm::LPCplex< GM, ACC >::GraphicalModelType

Reimplemented from opengm::Inference< GM, ACC >.

Definition at line 41 of file lpcplex.hxx.

template<class GM, class ACC>
typedef TimingVisitor<LPCplex<GM, ACC> > opengm::LPCplex< GM, ACC >::TimingVisitorType

Definition at line 44 of file lpcplex.hxx.

template<class GM, class ACC>
typedef VerboseVisitor<LPCplex<GM, ACC> > opengm::LPCplex< GM, ACC >::VerboseVisitorType

Definition at line 43 of file lpcplex.hxx.


Constructor & Destructor Documentation

template<class GM , class ACC >
opengm::LPCplex< GM, ACC >::LPCplex ( const GraphicalModelType gm,
const Parameter para = Parameter() 
) [inline]

Definition at line 132 of file lpcplex.hxx.

Here is the call graph for this function:

template<class GM , class ACC >
opengm::LPCplex< GM, ACC >::~LPCplex (  )  [inline]

Definition at line 354 of file lpcplex.hxx.


Member Function Documentation

template<class GM , class ACC >
template<class LPVariableIndexIterator , class CoefficientIterator >
void opengm::LPCplex< GM, ACC >::addConstraint ( LPVariableIndexIterator  viBegin,
LPVariableIndexIterator  viEnd,
CoefficientIterator  coefficient,
const ValueType lowerBound,
const ValueType upperBound 
) [inline]

add cosntraint

Parameters:
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.

template<class GM, class ACC>
virtual InferenceTermination opengm::LPCplex< GM, ACC >::arg ( std::vector< LabelType > &  arg,
const   argIndex = 1 
) const [virtual]

output a solution

Parameters:
[out] arg labeling
argIndex solution index (0=best, 1=second best, etc.)

Reimplemented from opengm::Inference< GM, ACC >.

Here is the caller graph for this function:

template<class GM, class 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.

template<class GM , class ACC >
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.

template<class GM , class ACC >
void opengm::LPCplex< GM, ACC >::factorVariable ( const size_t  factorId,
IndependentFactorType out 
) const [inline]

Definition at line 397 of file lpcplex.hxx.

template<class GM , class ACC >
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.

template<class GM , class ACC >
template<class VisitorType >
InferenceTermination opengm::LPCplex< GM, ACC >::infer ( VisitorType &  visitor  )  [inline]

Definition at line 298 of file lpcplex.hxx.

template<class GM , class ACC >
InferenceTermination opengm::LPCplex< GM, ACC >::infer (  )  [inline, virtual]

Implements opengm::Inference< GM, ACC >.

Definition at line 289 of file lpcplex.hxx.

template<class GM, class ACC>
template<class LABELING_ITERATOR >
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.

template<class GM, class ACC>
template<class LABELING_ITERATOR >
size_t opengm::LPCplex< GM, ACC >::lpFactorVi ( const IndexType  factorIndex,
LABELING_ITERATOR  labelingBegin,
LABELING_ITERATOR  labelingEnd 
) const [inline]
template<class GM, class ACC>
size_t opengm::LPCplex< GM, ACC >::lpFactorVi ( const IndexType  factorIndex,
const size_t  labelingIndex 
) const
template<class GM, class ACC>
size_t opengm::LPCplex< GM, ACC >::lpNodeVi ( const IndexType  variableIndex,
const LabelType  label 
) const
template<class GM, class ACC>
virtual std::string opengm::LPCplex< GM, ACC >::name (  )  const [inline, virtual]

Implements opengm::Inference< GM, ACC >.

Definition at line 93 of file lpcplex.hxx.

template<class GM , class ACC >
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.

Here is the call graph for this function:

template<class GM , class ACC >
void opengm::LPCplex< GM, ACC >::variable ( const size_t  nodeId,
IndependentFactorType out 
) const [inline]

Definition at line 382 of file lpcplex.hxx.


Member Data Documentation

template<class GM, class ACC>
opengm::LPCplex< GM, ACC >::OPENGM_GM_TYPE_TYPEDEFS

Definition at line 42 of file lpcplex.hxx.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Mon Jun 17 16:31:12 2013 for OpenGM by  doxygen 1.6.3