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

A star search algorithm. More...

#include <astar.hxx>

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

List of all members.

Classes

struct  Parameter

Public Types

enum  Heuristic { DEFAULT_HEURISTIC = 0, FAST_HEURISTIC = 1, STANDARD_HEURISTIC = 2 }
typedef GM GraphicalModelType
 graphical model type
typedef
GraphicalModelType::template
Rebind< true >::RebindType 
EditableGraphicalModelType
typedef ACC AccumulationType
 accumulation type
typedef std::vector< LabelTypeConfVec
 configuration vector type
typedef ConfVec::iterator ConfVecIt
 configuration iterator
typedef VerboseVisitor< AStar
< GM, ACC > > 
VerboseVisitorType
 visitor
typedef TimingVisitor< AStar
< GM, ACC > > 
TimingVisitorType
typedef EmptyVisitor< AStar
< GM, ACC > > 
EmptyVisitorType

Public Member Functions

 AStar (const GM &gm, Parameter para=Parameter())
 constructor
virtual std::string name () const
const GraphicalModelTypegraphicalModel () const
virtual InferenceTermination infer ()
virtual void reset ()
 reset
template<class VisitorType >
InferenceTermination infer (VisitorType &vistitor)
 inference with visitor
ValueType bound () const
 return a bound on the solution
virtual InferenceTermination marginal (const size_t, IndependentFactorType &out) const
 output a solution for a marginal for a specific variable
virtual InferenceTermination factorMarginal (const size_t, IndependentFactorType &out) const
 output a solution for a marginal for all variables connected to a factor
virtual InferenceTermination arg (std::vector< LabelType > &v, const size_t=1) const
 output a solution
virtual InferenceTermination args (std::vector< std::vector< LabelType > > &v) const

Public Attributes

 OPENGM_GM_TYPE_TYPEDEFS

Detailed Description

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

A star search algorithm.

Kappes, J. H. "Inference on Highly-Connected Discrete Graphical Models with Applications to Visual Object Recognition". Ph.D. Thesis 2011 Bergtholdt, M. & Kappes, J. H. & Schnoerr, C.: "Learning of Graphical Models and Efficient Inference for Object Class Recognition", DAGM 2006 Bergtholdt, M. & Kappes, J. H. & Schmidt, S. & Schnoerr, C.: "A Study of Parts-Based Object Class Detection Using Complete Graphs" IJCV 2010

Within this implementation of the AStar-Algo the user has to set the the node order and a acyclic graph for the calculation of the heuristic. A good choice for both is critical for good performance! A heuristic which select these parameters automatically will be added in the next version

The AStar-Algo transform the problem into a shortest path problem in an exponentially large graph. Due to the problem structure, this graph can be represented implicitly! To find the shortest path we perform a best first search and use a admissable tree-based heuristic to underestimate the cost to a goal node. This lower bound allows us to reduce the search to an manageable subspace of the exponentially large search-space.

Examples:

one_to_one_matching.cxx.

Definition at line 63 of file astar.hxx.


Member Typedef Documentation

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

accumulation type

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

Definition at line 70 of file astar.hxx.

template<class GM , class ACC >
typedef std::vector<LabelType> opengm::AStar< GM, ACC >::ConfVec

configuration vector type

Definition at line 73 of file astar.hxx.

template<class GM , class ACC >
typedef ConfVec::iterator opengm::AStar< GM, ACC >::ConfVecIt

configuration iterator

Definition at line 75 of file astar.hxx.

template<class GM , class ACC >
typedef GraphicalModelType::template Rebind<true>::RebindType opengm::AStar< GM, ACC >::EditableGraphicalModelType

Definition at line 68 of file astar.hxx.

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

Definition at line 79 of file astar.hxx.

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

graphical model type

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

Definition at line 67 of file astar.hxx.

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

Definition at line 78 of file astar.hxx.

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

visitor

Definition at line 77 of file astar.hxx.


Member Enumeration Documentation

template<class GM , class ACC >
enum opengm::AStar::Heuristic
Enumerator:
DEFAULT_HEURISTIC 
FAST_HEURISTIC 
STANDARD_HEURISTIC 

Definition at line 81 of file astar.hxx.


Constructor & Destructor Documentation

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

constructor

Parameters:
gm graphical model
para AStar parameter

Definition at line 170 of file astar.hxx.


Member Function Documentation

template<class GM , class ACC >
virtual InferenceTermination opengm::AStar< 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 >.

template<class GM , class ACC >
virtual InferenceTermination opengm::AStar< GM, ACC >::args ( std::vector< std::vector< LabelType > > &  v  )  const [virtual]

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

template<class GM , class ACC >
ValueType opengm::AStar< GM, ACC >::bound (  )  const [inline, virtual]

return a bound on the solution

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

Definition at line 128 of file astar.hxx.

Here is the caller graph for this function:

template<class GM , class ACC >
virtual InferenceTermination opengm::AStar< GM, ACC >::factorMarginal ( const   factorIndex,
IndependentFactorType out 
) const [inline, virtual]

output a solution for a marginal for all variables connected to a factor

Parameters:
factorIndex index of the factor
[out] out the marginal

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

Definition at line 130 of file astar.hxx.

template<class GM , class ACC >
const AStar< GM, ACC >::GraphicalModelType & opengm::AStar< GM, ACC >::graphicalModel (  )  const [inline, virtual]

Implements opengm::Inference< GM, ACC >.

Definition at line 636 of file astar.hxx.

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

inference with visitor

Parameters:
visitor visitor

Definition at line 279 of file astar.hxx.

Here is the call graph for this function:

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

Implements opengm::Inference< GM, ACC >.

Definition at line 269 of file astar.hxx.

template<class GM , class ACC >
virtual InferenceTermination opengm::AStar< GM, ACC >::marginal ( const   variableIndex,
IndependentFactorType out 
) const [inline, virtual]

output a solution for a marginal for a specific variable

Parameters:
variableIndex index of the variable
[out] out the marginal

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

Definition at line 129 of file astar.hxx.

template<class GM , class ACC >
virtual std::string opengm::AStar< GM, ACC >::name (  )  const [inline, virtual]

Implements opengm::Inference< GM, ACC >.

Definition at line 123 of file astar.hxx.

template<class GM , class ACC >
void opengm::AStar< GM, ACC >::reset (  )  [inline, virtual]

reset

Warning:
reset assumes that the structure of the graphical model has not changed

TODO

todo

Definition at line 262 of file astar.hxx.


Member Data Documentation

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

Definition at line 71 of file astar.hxx.

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