OpenGM  2.3.x
Discrete Graphical Model Library
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
opengm::LOC< GM, ACC > Class Template Reference

LOC Algorithm

K. Jung, P. Kohli and D. Shah, "Local Rules for Global MAP: When Do They Work?", NIPS 2009. More...

#include <loc.hxx>

+ Inheritance diagram for opengm::LOC< GM, ACC >:
+ Collaboration diagram for opengm::LOC< GM, ACC >:

Classes

class  Parameter
 

Public Types

typedef ACC AccumulationType
 
typedef GM GraphicalModelType
 
typedef Movemaker< GraphicalModelTypeMovemakerType
 
typedef opengm::visitors::VerboseVisitor< LOC< GM, ACC > > VerboseVisitorType
 
typedef opengm::visitors::EmptyVisitor< LOC< GM, ACC > > EmptyVisitorType
 
typedef opengm::visitors::TimingVisitor< LOC< GM, ACC > > TimingVisitorType
 
typedef SubmodelOptimizer< GM, ACC > SubOptimizer
 
typedef SubOptimizer::SubGmType SubGmType
 
typedef opengm::DynamicProgramming< SubGmType, AccumulationTypeDpSubInf
 
typedef opengm::AStar< SubGmType, AccumulationTypeAStarSubInf
 
typedef opengm::LazyFlipper< SubGmType, AccumulationTypeLfSubInf
 
typedef opengm::BeliefPropagationUpdateRules< SubGmType, AccumulationTypeUpdateRulesTypeBp
 
typedef opengm::TrbpUpdateRules< SubGmType, AccumulationTypeUpdateRulesTypeTrbp
 
typedef opengm::MessagePassing< SubGmType, AccumulationType, UpdateRulesTypeBp, opengm::MaxDistanceBpSubInf
 
typedef opengm::MessagePassing< SubGmType, AccumulationType, UpdateRulesTypeTrbp, opengm::MaxDistanceTrBpSubInf
 
typedef opengm::external::AD3Inf< SubGmType, AccumulationTypeAd3SubInf
 
- Public Types inherited from opengm::Inference< GM, ACC >
typedef GM GraphicalModelType
 
typedef ACC AccumulationType
 
typedef GraphicalModelType::LabelType LabelType
 
typedef GraphicalModelType::IndexType IndexType
 
typedef GraphicalModelType::ValueType ValueType
 
typedef GraphicalModelType::OperatorType OperatorType
 
typedef GraphicalModelType::FactorType FactorType
 
typedef GraphicalModelType::IndependentFactorType IndependentFactorType
 
typedef GraphicalModelType::FunctionIdentifier FunctionIdentifier
 

Public Member Functions

 LOC (const GraphicalModelType &, const Parameter &param=Parameter())
 
std::string name () const
 
const GraphicalModelTypegraphicalModel () const
 
InferenceTermination infer ()
 
void reset ()
 
template<class VisitorType >
InferenceTermination infer (VisitorType &)
 
void setStartingPoint (typename std::vector< LabelType >::const_iterator)
 set initial labeling More...
 
InferenceTermination arg (std::vector< LabelType > &, const size_t=1) const
 output a solution More...
 
ValueType value () const
 return the solution (value) More...
 
template<class VI_ITER >
void setBorderDirty (VI_ITER begin, VI_ITER end)
 
template<class VI_ITER >
void setInsideClean (VI_ITER begin, VI_ITER end)
 
template<class VI_ITER >
bool hasDirtyInsideVariables (VI_ITER begin, VI_ITER end)
 
- Public Member Functions inherited from opengm::Inference< GM, ACC >
virtual ~Inference ()
 
virtual InferenceTermination args (std::vector< std::vector< LabelType > > &) const
 
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...
 
virtual ValueType bound () const
 return a bound on the solution 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
 

Detailed Description

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

LOC Algorithm

K. Jung, P. Kohli and D. Shah, "Local Rules for Global MAP: When Do They Work?", NIPS 2009.

In this implementation, the user needs to set the parameter of the truncated geometric distribution by hand. Depending on the size of the subgraph, either A* or exhaustive search is used for MAP estimation on the subgraph

Definition at line 53 of file loc.hxx.

Member Typedef Documentation

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

Definition at line 55 of file loc.hxx.

template<class GM, class ACC>
typedef opengm::external::AD3Inf<SubGmType,AccumulationType> opengm::LOC< GM, ACC >::Ad3SubInf

Definition at line 79 of file loc.hxx.

template<class GM, class ACC>
typedef opengm::AStar<SubGmType,AccumulationType> opengm::LOC< GM, ACC >::AStarSubInf

Definition at line 71 of file loc.hxx.

Definition at line 75 of file loc.hxx.

template<class GM, class ACC>
typedef opengm::DynamicProgramming<SubGmType,AccumulationType> opengm::LOC< GM, ACC >::DpSubInf

Definition at line 70 of file loc.hxx.

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

Definition at line 61 of file loc.hxx.

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

Definition at line 56 of file loc.hxx.

template<class GM, class ACC>
typedef opengm::LazyFlipper<SubGmType,AccumulationType> opengm::LOC< GM, ACC >::LfSubInf

Definition at line 72 of file loc.hxx.

template<class GM, class ACC>
typedef Movemaker<GraphicalModelType> opengm::LOC< GM, ACC >::MovemakerType

Definition at line 58 of file loc.hxx.

template<class GM, class ACC>
typedef SubOptimizer::SubGmType opengm::LOC< GM, ACC >::SubGmType

Definition at line 66 of file loc.hxx.

template<class GM, class ACC>
typedef SubmodelOptimizer<GM,ACC> opengm::LOC< GM, ACC >::SubOptimizer

Definition at line 65 of file loc.hxx.

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

Definition at line 62 of file loc.hxx.

Definition at line 76 of file loc.hxx.

Definition at line 73 of file loc.hxx.

template<class GM, class ACC>
typedef opengm::TrbpUpdateRules<SubGmType,AccumulationType> opengm::LOC< GM, ACC >::UpdateRulesTypeTrbp

Definition at line 74 of file loc.hxx.

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

Definition at line 60 of file loc.hxx.

Constructor & Destructor Documentation

template<class GM , class ACC >
opengm::LOC< GM, ACC >::LOC ( const GraphicalModelType gm,
const Parameter param = Parameter() 
)

Definition at line 220 of file loc.hxx.

Member Function Documentation

template<class GM , class ACC >
InferenceTermination opengm::LOC< GM, ACC >::arg ( std::vector< LabelType > &  arg,
const size_t  argIndex = 1 
) const
inlinevirtual

output a solution

Parameters
[out]arglabeling
argIndexsolution index (1=best, 2=second best, etc.)

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

Definition at line 686 of file loc.hxx.

template<class GM , class ACC >
const LOC< GM, ACC >::GraphicalModelType & opengm::LOC< GM, ACC >::graphicalModel ( ) const
inlinevirtual

Implements opengm::Inference< GM, ACC >.

Definition at line 302 of file loc.hxx.

template<class GM, class ACC>
template<class VI_ITER >
bool opengm::LOC< GM, ACC >::hasDirtyInsideVariables ( VI_ITER  begin,
VI_ITER  end 
)
inline

Definition at line 179 of file loc.hxx.

template<class GM , class ACC >
InferenceTermination opengm::LOC< GM, ACC >::infer ( )
inlinevirtual

Implements opengm::Inference< GM, ACC >.

Definition at line 447 of file loc.hxx.

template<class GM , class ACC >
template<class VisitorType >
InferenceTermination opengm::LOC< GM, ACC >::infer ( VisitorType &  visitor)

Definition at line 456 of file loc.hxx.

+ Here is the call graph for this function:

template<class GM , class ACC >
std::string opengm::LOC< GM, ACC >::name ( ) const
inlinevirtual

Implements opengm::Inference< GM, ACC >.

Definition at line 296 of file loc.hxx.

template<class GM , class ACC >
void opengm::LOC< GM, ACC >::reset ( )

Definition at line 244 of file loc.hxx.

template<class GM, class ACC>
template<class VI_ITER >
void opengm::LOC< GM, ACC >::setBorderDirty ( VI_ITER  begin,
VI_ITER  end 
)
inline

Definition at line 152 of file loc.hxx.

template<class GM, class ACC>
template<class VI_ITER >
void opengm::LOC< GM, ACC >::setInsideClean ( VI_ITER  begin,
VI_ITER  end 
)
inline

Definition at line 168 of file loc.hxx.

template<class GM, class ACC>
void opengm::LOC< GM, ACC >::setStartingPoint ( typename std::vector< LabelType >::const_iterator  begin)
inlinevirtual

set initial labeling

Parameters
beginiterator to the beginning of a sequence of labels

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

Definition at line 259 of file loc.hxx.

template<class GM , class ACC >
LOC< GM, ACC >::ValueType opengm::LOC< GM, ACC >::value ( ) const
inlinevirtual

return the solution (value)

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

Definition at line 272 of file loc.hxx.

Member Data Documentation

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

Definition at line 57 of file loc.hxx.