OpenGM  2.3.x
Discrete Graphical Model Library
ad3.hxx
Go to the documentation of this file.
1 #pragma once
2 #ifndef OPENGM_EXTERNAL_AD3_HXX
3 #define OPENGM_EXTERNAL_AD3_HXX
4 
8 
9 
10 
11 #include "ad3/FactorGraph.h"
12 //#include "FactorSequence.h"
13 
14 
15 namespace opengm {
16  namespace external {
17 
21 
22  template<class GM,class ACC>
23  class AD3Inf : public Inference<GM, ACC> {
24 
25  public:
26  typedef GM GraphicalModelType;
27  typedef ACC AccumulationType;
32 
33  template<class _GM>
34  struct RebindGm{
36  };
37 
38  template<class _GM,class _ACC>
41  };
42 
43  enum SolverType{
47  };
48 
49  struct Parameter {
51  const SolverType solverType = AD3_ILP,
52  const double eta = 0.1,
53  const bool adaptEta = true,
54  UInt64Type steps = 1000,
55  const double residualThreshold = 1e-6,
56  const int verbosity = 0
57  ) :
58  solverType_(solverType),
59  eta_(eta),
60  adaptEta_(adaptEta),
61  steps_(steps),
62  residualThreshold_(residualThreshold),
63  verbosity_(verbosity)
64  {
65  }
66 
67  template<class P>
69  const P & p
70  ) :
71  solverType_(p.solverType_),
72  eta_(p.eta_),
73  adaptEta_(p.adaptEta_),
74  steps_(p.steps_),
75  residualThreshold_(p.residualThreshold_),
76  verbosity_(p.verbosity_)
77  {
78  }
79 
81 
82  double eta_;
83  bool adaptEta_;
87  };
88 
89  // construction
90  AD3Inf(const GraphicalModelType& gm, const Parameter para = Parameter());
91  ~AD3Inf();
92 
93  // query
94  std::string name() const;
95  const GraphicalModelType& graphicalModel() const;
96  // inference
98  template<class VisitorType>
99  InferenceTermination infer(VisitorType&);
100  InferenceTermination arg(std::vector<LabelType>&, const size_t& = 1) const;
101 
102  ValueType value()const{
103  return gm_.evaluate(arg_);
104  }
105 
106  ValueType bound()const{
107  if(inferenceDone_ && parameter_.solverType_==AD3_ILP ){
108  return bound_;
109  }
110  else{
111  return bound_;
112  }
113  }
114 
115 
117  if( meta::Compare<OperatorType,Adder>::value && meta::Compare<AccumulationType,Minimizer>::value){
118  return val*(-1.0);
119  }
120  else if( meta::Compare<OperatorType,Adder>::value && meta::Compare<AccumulationType,Maximizer>::value){
121  return val;
122  }
123  }
124 
126  if( meta::Compare<OperatorType,Adder>::value && meta::Compare<AccumulationType,Minimizer>::value){
127  return val*(-1.0);
128  }
129  else if( meta::Compare<OperatorType,Adder>::value && meta::Compare<AccumulationType,Maximizer>::value){
130  return val;
131  }
132  }
133 
134 
135  // iterface to create a ad3 gm without a gm
136 
137  template<class N_LABELS_ITER>
138  AD3Inf(N_LABELS_ITER nLabelsBegin,N_LABELS_ITER nLabelsEnd, const Parameter para = Parameter());
139 
140 
141  AD3Inf(const UInt64Type nVar,const UInt64Type nLabels, const Parameter para,const bool foo);
142 
143 
144  template<class VI_ITERATOR,class FUNCTION>
145  void addFactor(VI_ITERATOR viBegin,VI_ITERATOR viEnd,const FUNCTION & function);
146 
147 
148  const std::vector<double> & posteriors()const{
149  return posteriors_;
150  }
151 
152  const std::vector<double> & higherOrderPosteriors()const{
153  return additional_posteriors_;
154  }
155 
156 
157  private:
158  const GraphicalModelType& gm_;
159  Parameter parameter_;
160  IndexType numVar_;
161 
162  // AD3Inf MEMBERS
163  AD3::FactorGraph factor_graph_;
164  std::vector<AD3::MultiVariable*> multi_variables_;
165 
166  std::vector<double> posteriors_;
167  std::vector<double> additional_posteriors_;
168  double bound_;
169 
170  std::vector<LabelType> arg_;
171 
172  bool inferenceDone_;
173 
174  std::vector<LabelType> space_; // only used if setup without gm
175 
176  };
177  // public interface
181 
182  template<class GM,class ACC>
184  ::AD3Inf(
185  const typename AD3Inf::GraphicalModelType& gm,
186  const Parameter para
187  ) :
188  gm_(gm),
189  parameter_(para),
190  numVar_(gm.numberOfVariables()),
191  factor_graph_(),
192  multi_variables_(gm.numberOfVariables()),
193  posteriors_(),
194  additional_posteriors_(),
195  bound_(),
196  arg_(gm.numberOfVariables(),static_cast<LabelType>(0)),
197  inferenceDone_(false),
198  space_(0)
199  {
200 
201  if(meta::Compare<OperatorType,Adder>::value==false){
202  throw RuntimeError("AD3 does not only support opengm::Adder as Operator");
203  }
204 
205  if(meta::Compare<AccumulationType,Minimizer>::value==false and meta::Compare<AccumulationType,Maximizer>::value==false ){
206  throw RuntimeError("AD3 does not only support opengm::Minimizer and opengm::Maximizer as Accumulatpr");
207  }
208 
209 
210  bound_ = ACC::template ineutral<ValueType>();
211 
212 
213 
214  factor_graph_.SetVerbosity(parameter_.verbosity_);
215  UInt64Type maxFactorSize = 0 ;
216  for(IndexType fi=0;fi<gm_.numberOfFactors();++fi){
217  maxFactorSize=std::max(static_cast<UInt64Type>(gm_[fi].size()),maxFactorSize);
218  }
219 
220  ValueType * facVal = new ValueType[maxFactorSize];
221 
222 
223  // fill space :
224  // - Create a multi-valued variable for variable of gm
225  // and initialize unaries with 0
226  for(IndexType vi=0;vi<gm_.numberOfVariables();++vi){
227  multi_variables_[vi] = factor_graph_.CreateMultiVariable(gm_.numberOfLabels(vi));
228  for(LabelType l=0;l<gm_.numberOfLabels(vi);++l){
229  multi_variables_[vi]->SetLogPotential(l,0.0);
230  }
231  }
232 
233 
234  // - add higher order factors
235  // - setup values for 1. order and higher order factors
236  for(IndexType fi=0;fi<gm_.numberOfFactors();++fi){
237  //gm_[fi].copyValues(facVal);
238  gm_[fi].copyValuesSwitchedOrder(facVal);
239  const IndexType nVar=gm_[fi].numberOfVariables();
240 
241  if(nVar==1){
242  const IndexType vi0 = gm_[fi].variableIndex(0);
243  const IndexType nl0 = gm_.numberOfLabels(vi0);
244 
245  for(LabelType l=0;l<nl0;++l){
246  const ValueType logP = multi_variables_[vi0]->GetLogPotential(l);
247  const ValueType val = this->valueToMaxSum(facVal[l]);
248  multi_variables_[vi0]->SetLogPotential(l,logP+val);
249  }
250  }
251  else if (nVar>1){
252  // std::cout<<"factor size "<<gm_[fi].size()<<"\n";
253  // create higher order factor function
254  std::vector<double> additional_log_potentials(gm_[fi].size());
255  for(IndexType i=0;i<gm_[fi].size();++i){
256  additional_log_potentials[i]=this->valueToMaxSum(facVal[i]);
257  }
258 
259  // create high order factor vi
260  std::vector<AD3::MultiVariable*> multi_variables_local(nVar);
261  for(IndexType v=0;v<nVar;++v){
262  multi_variables_local[v]=multi_variables_[gm_[fi].variableIndex(v)];
263  }
264 
265  // create higher order factor
266  factor_graph_.CreateFactorDense(multi_variables_local,additional_log_potentials);
267  }
268  else{
269  OPENGM_CHECK(false,"const factors are not yet implemented");
270  }
271 
272  }
273 
274  // delete buffer
275  delete[] facVal;
276  }
277 
278  template<class GM,class ACC>
279  template<class N_LABELS_ITER>
281  N_LABELS_ITER nLabelsBegin,
282  N_LABELS_ITER nLabelsEnd,
283  const Parameter para
284  ) :
285  gm_(GM()), // DIRTY
286  parameter_(para),
287  numVar_(std::distance(nLabelsBegin,nLabelsEnd)),
288  factor_graph_(),
289  multi_variables_(std::distance(nLabelsBegin,nLabelsEnd)),
290  posteriors_(),
291  additional_posteriors_(),
292  bound_(),
293  arg_(std::distance(nLabelsBegin,nLabelsEnd),static_cast<LabelType>(0)),
294  space_(nLabelsBegin,nLabelsEnd)
295  {
296 
297  if(meta::Compare<OperatorType,Adder>::value==false){
298  throw RuntimeError("AD3 does not only support opengm::Adder as Operator");
299  }
300  if(meta::Compare<AccumulationType,Minimizer>::value==false and meta::Compare<AccumulationType,Maximizer>::value==false ){
301  throw RuntimeError("AD3 does not only support opengm::Minimizer and opengm::Maximizer as Accumulatpr");
302  }
303  bound_ = ACC::template ineutral<ValueType>();
304  factor_graph_.SetVerbosity(parameter_.verbosity_);
305 
306  // and initialize unaries with 0
307  for(IndexType vi=0;vi<numVar_;++vi){
308  multi_variables_[vi] = factor_graph_.CreateMultiVariable(space_[vi]);
309  for(LabelType l=0;l<space_[vi];++l){
310  multi_variables_[vi]->SetLogPotential(l,0.0);
311  }
312  }
313  }
314 
315  template<class GM,class ACC>
317  const UInt64Type nVar,
318  const UInt64Type nLabels,
319  const Parameter para,
320  const bool foo
321  ) :
322  gm_(GM()), // DIRTY
323  parameter_(para),
324  numVar_(nVar),
325  factor_graph_(),
326  multi_variables_(nVar),
327  posteriors_(),
328  additional_posteriors_(),
329  bound_(),
330  arg_(nVar,static_cast<LabelType>(0)),
331  space_(nVar,nLabels)
332  {
333 
334  if(meta::Compare<OperatorType,Adder>::value==false){
335  throw RuntimeError("AD3 does not only support opengm::Adder as Operator");
336  }
337  if(meta::Compare<AccumulationType,Minimizer>::value==false and meta::Compare<AccumulationType,Maximizer>::value==false ){
338  throw RuntimeError("AD3 does not only support opengm::Minimizer and opengm::Maximizer as Accumulatpr");
339  }
340  bound_ = ACC::template ineutral<ValueType>();
341  factor_graph_.SetVerbosity(parameter_.verbosity_);
342  for(IndexType vi=0;vi<numVar_;++vi){
343  multi_variables_[vi] = factor_graph_.CreateMultiVariable(space_[vi]);
344  for(LabelType l=0;l<space_[vi];++l){
345  multi_variables_[vi]->SetLogPotential(l,0.0);
346  }
347  }
348  }
349 
350 
351  template<class GM,class ACC>
352  template<class VI_ITERATOR,class FUNCTION>
353  void
355  VI_ITERATOR visBegin,
356  VI_ITERATOR visEnd,
357  const FUNCTION & function
358  ){
359  const IndexType nVis = std::distance(visBegin,visEnd);
360  OPENGM_CHECK_OP(nVis,==,function.dimension(),"functions dimension does not match number of variabole indices");
361 
362  for(IndexType v=0;v<nVis;++v){
363  OPENGM_CHECK_OP(space_[visBegin[v]],==,function.shape(v),"functions shape does not match space");
364  }
365 
366 
367  if(nVis==1){
368  LabelType l[1];
369  for(l[0]=0; l[0]<space_[visBegin[0]]; ++l[0]){
370  const ValueType logP = multi_variables_[visBegin[0]]->GetLogPotential(l[0]);
371  const ValueType val = this->valueToMaxSum(function(l));
372  multi_variables_[visBegin[0]]->SetLogPotential(l[0],logP+val);
373  }
374  }
375  else if(nVis>=2){
376 
377 
378  // create high order factor vi
379  std::vector<AD3::MultiVariable*> multi_variables_local(nVis);
380  for(IndexType v=0;v<nVis;++v){
381  multi_variables_local[v]=multi_variables_[visBegin[v]];
382  }
383 
384  // create higher order function (for dense factor)
385  std::vector<double> additional_log_potentials(function.size());
386 
387  // FILL THE FUNCTION
388 
389  if(nVis==2){
390  LabelType l[2];
391  UInt64Type c=0;
392  for(l[0]=0; l[0]<space_[visBegin[0]]; ++l[0])
393  for(l[1]=0; l[1]<space_[visBegin[1]]; ++l[1]){
394  additional_log_potentials[c]=this->valueToMaxSum(function(l));
395  ++c;
396  }
397  }
398  else if(nVis==3){
399  LabelType l[3];
400  UInt64Type c=0;
401  for(l[0]=0; l[0]<space_[visBegin[0]]; ++l[0])
402  for(l[1]=0; l[1]<space_[visBegin[1]]; ++l[1])
403  for(l[2]=0; l[2]<space_[visBegin[2]]; ++l[2]){
404  additional_log_potentials[c]=this->valueToMaxSum(function(l));
405  ++c;
406  }
407  }
408  else if(nVis==4){
409  LabelType l[4];
410  UInt64Type c=0;
411  for(l[0]=0; l[0]<space_[visBegin[0]]; ++l[0])
412  for(l[1]=0; l[1]<space_[visBegin[1]]; ++l[1])
413  for(l[2]=0; l[2]<space_[visBegin[2]]; ++l[2])
414  for(l[3]=0; l[3]<space_[visBegin[3]]; ++l[3]){
415  additional_log_potentials[c]=this->valueToMaxSum(function(l));
416  ++c;
417  }
418  }
419  else if(nVis==5){
420  LabelType l[5];
421  UInt64Type c=0;
422  for(l[0]=0; l[0]<space_[visBegin[0]]; ++l[0])
423  for(l[1]=0; l[1]<space_[visBegin[1]]; ++l[1])
424  for(l[2]=0; l[2]<space_[visBegin[2]]; ++l[2])
425  for(l[3]=0; l[3]<space_[visBegin[3]]; ++l[3])
426  for(l[4]=0; l[4]<space_[visBegin[4]]; ++l[4]){
427  additional_log_potentials[c]=this->valueToMaxSum(function(l));
428  ++c;
429  }
430  }
431  else if(nVis==6){
432  LabelType l[6];
433  UInt64Type c=0;
434  for(l[0]=0; l[0]<space_[visBegin[0]]; ++l[0])
435  for(l[1]=0; l[1]<space_[visBegin[1]]; ++l[1])
436  for(l[2]=0; l[2]<space_[visBegin[2]]; ++l[2])
437  for(l[3]=0; l[3]<space_[visBegin[3]]; ++l[3])
438  for(l[4]=0; l[4]<space_[visBegin[4]]; ++l[4])
439  for(l[5]=0; l[5]<space_[visBegin[5]]; ++l[5]){
440  additional_log_potentials[c]=this->valueToMaxSum(function(l));
441  ++c;
442  }
443  }
444  else if(nVis==7){
445  LabelType l[7];
446  UInt64Type c=0;
447  for(l[0]=0; l[0]<space_[visBegin[0]]; ++l[0])
448  for(l[1]=0; l[1]<space_[visBegin[1]]; ++l[1])
449  for(l[2]=0; l[2]<space_[visBegin[2]]; ++l[2])
450  for(l[3]=0; l[3]<space_[visBegin[3]]; ++l[3])
451  for(l[4]=0; l[4]<space_[visBegin[4]]; ++l[4])
452  for(l[5]=0; l[5]<space_[visBegin[5]]; ++l[5])
453  for(l[6]=0; l[6]<space_[visBegin[6]]; ++l[6]){
454  additional_log_potentials[c]=this->valueToMaxSum(function(l));
455  ++c;
456  }
457  }
458  else if(nVis==8){
459  LabelType l[8];
460  UInt64Type c=0;
461  for(l[0]=0; l[0]<space_[visBegin[0]]; ++l[0])
462  for(l[1]=0; l[1]<space_[visBegin[1]]; ++l[1])
463  for(l[2]=0; l[2]<space_[visBegin[2]]; ++l[2])
464  for(l[3]=0; l[3]<space_[visBegin[3]]; ++l[3])
465  for(l[4]=0; l[4]<space_[visBegin[4]]; ++l[4])
466  for(l[5]=0; l[5]<space_[visBegin[5]]; ++l[5])
467  for(l[6]=0; l[6]<space_[visBegin[6]]; ++l[6])
468  for(l[7]=0; l[7]<space_[visBegin[7]]; ++l[7])
469  {
470  additional_log_potentials[c]=this->valueToMaxSum(function(l));
471  ++c;
472  }
473  }
474  else if(nVis==9){
475  LabelType l[9];
476  UInt64Type c=0;
477  for(l[0]=0; l[0]<space_[visBegin[0]]; ++l[0])
478  for(l[1]=0; l[1]<space_[visBegin[1]]; ++l[1])
479  for(l[2]=0; l[2]<space_[visBegin[2]]; ++l[2])
480  for(l[3]=0; l[3]<space_[visBegin[3]]; ++l[3])
481  for(l[4]=0; l[4]<space_[visBegin[4]]; ++l[4])
482  for(l[5]=0; l[5]<space_[visBegin[5]]; ++l[5])
483  for(l[6]=0; l[6]<space_[visBegin[6]]; ++l[6])
484  for(l[7]=0; l[7]<space_[visBegin[7]]; ++l[7])
485  for(l[8]=0; l[8]<space_[visBegin[8]]; ++l[8])
486  {
487  additional_log_potentials[c]=this->valueToMaxSum(function(l));
488  ++c;
489  }
490  }
491  else if(nVis==10){
492  LabelType l[10];
493  UInt64Type c=0;
494  for(l[0]=0; l[0]<space_[visBegin[0]]; ++l[0])
495  for(l[1]=0; l[1]<space_[visBegin[1]]; ++l[1])
496  for(l[2]=0; l[2]<space_[visBegin[2]]; ++l[2])
497  for(l[3]=0; l[3]<space_[visBegin[3]]; ++l[3])
498  for(l[4]=0; l[4]<space_[visBegin[4]]; ++l[4])
499  for(l[5]=0; l[5]<space_[visBegin[5]]; ++l[5])
500  for(l[6]=0; l[6]<space_[visBegin[6]]; ++l[6])
501  for(l[7]=0; l[7]<space_[visBegin[7]]; ++l[7])
502  for(l[8]=0; l[8]<space_[visBegin[8]]; ++l[8])
503  for(l[9]=0; l[9]<space_[visBegin[9]]; ++l[9])
504  {
505  additional_log_potentials[c]=this->valueToMaxSum(function(l));
506  ++c;
507  }
508  }
509  else{
510  throw RuntimeError("order must be <=10 for inplace building of Ad3Inf (call us if you need higher order)");
511  }
512 
513 
514 
515 
516 
517  // create higher order factor
518  factor_graph_.CreateFactorDense(multi_variables_local,additional_log_potentials);
519 
520  }
521 
522  }
523 
524 
525  template<class GM,class ACC>
528 
529  }
530 
531  template<class GM,class ACC>
532  inline std::string
534  ::name() const {
535  return "AD3Inf";
536  }
537 
538  template<class GM,class ACC>
539  inline const typename AD3Inf<GM,ACC>::GraphicalModelType&
542  return gm_;
543  }
544 
545  template<class GM,class ACC>
546  inline InferenceTermination
549  EmptyVisitorType v;
550  return infer(v);
551  }
552 
553  template<class GM,class ACC>
554  template<class VisitorType>
556  AD3Inf<GM,ACC>::infer(VisitorType& visitor)
557  {
558  visitor.begin(*this);
559 
560  // set parameters
561  if(parameter_.solverType_ == AD3_LP || parameter_.solverType_ == AD3_ILP){
562  factor_graph_.SetEtaAD3(parameter_.eta_);
563  factor_graph_.AdaptEtaAD3(parameter_.adaptEta_);
564  factor_graph_.SetMaxIterationsAD3(parameter_.steps_);
565  factor_graph_.SetResidualThresholdAD3(parameter_.residualThreshold_);
566  }
567  if(parameter_.solverType_ == PSDD_LP){
568  factor_graph_.SetEtaPSDD(parameter_.eta_);
569  factor_graph_.SetMaxIterationsPSDD(parameter_.steps_);
570  }
571 
572 
573  // solve
574  double value;
575  if ( parameter_.solverType_ == AD3_LP){
576  //std::cout<<"ad3 lp\n";
577  factor_graph_.SolveLPMAPWithAD3(&posteriors_, &additional_posteriors_, &value, &bound_);
578  }
579  if ( parameter_.solverType_ == AD3_ILP){
580  //std::cout<<"ad3 ilp\n";
581  factor_graph_.SolveExactMAPWithAD3(&posteriors_, &additional_posteriors_, &value, &bound_);
582  }
583  if (parameter_.solverType_ == PSDD_LP){
584  //std::cout<<"ad3 psdd lp\n";
585  factor_graph_.SolveExactMAPWithAD3(&posteriors_, &additional_posteriors_, &value, &bound_);
586  }
587 
588  // transform bound
589  bound_ =this->valueFromMaxSum(bound_);
590 
591  // make gm arg
592  UInt64Type c=0;
593  for(IndexType vi = 0; vi < numVar_; ++vi) {
594  LabelType bestLabel = 0 ;
595  double bestVal = -100000;
596  const LabelType nLabels = (space_.size()==0 ? gm_.numberOfLabels(vi) : space_[vi] );
597  for(LabelType l=0;l< nLabels;++l){
598  const double val = posteriors_[c];
599  //std::cout<<"vi= "<<vi<<" l= "<<l<<" val= "<<val<<"\n";
600 
601  if(bestVal<0 || val>bestVal){
602  bestVal=val;
603  bestLabel=l;
604  }
605  ++c;
606  }
607  arg_[vi]=bestLabel;
608  }
609  inferenceDone_=true;
610 
611 
612  visitor.end(*this);
613  return NORMAL;
614  }
615 
616  template<class GM,class ACC>
617  inline InferenceTermination
619  ::arg(std::vector<LabelType>& arg, const size_t& n) const {
620  if(n > 1) {
621  return UNKNOWN;
622  }
623  else {
624  arg.resize(numVar_);
625  std::copy(arg_.begin(),arg_.end(),arg.begin());
626  return NORMAL;
627  }
628  }
629 
630 
631  } // namespace external
632 } // namespace opengm
633 
634 #endif // #ifndef OPENGM_EXTERNAL_AD3Inf_HXX
635 
The OpenGM namespace.
Definition: config.hxx:43
AD3Inf(const GraphicalModelType &gm, const Parameter para=Parameter())
void addFactor(VI_ITERATOR viBegin, VI_ITERATOR viEnd, const FUNCTION &function)
Definition: ad3.hxx:354
ValueType valueToMaxSum(const ValueType val) const
Definition: ad3.hxx:116
const std::vector< double > & higherOrderPosteriors() const
Definition: ad3.hxx:152
ValueType value() const
return the solution (value)
Definition: ad3.hxx:102
Parameter(const SolverType solverType=AD3_ILP, const double eta=0.1, const bool adaptEta=true, UInt64Type steps=1000, const double residualThreshold=1e-6, const int verbosity=0)
Definition: ad3.hxx:50
STL namespace.
const GraphicalModelType & graphicalModel() const
Definition: ad3.hxx:541
detail_types::UInt64Type UInt64Type
uint64
Definition: config.hxx:300
ValueType bound() const
return a bound on the solution
Definition: ad3.hxx:106
const std::vector< double > & posteriors() const
Definition: ad3.hxx:148
GraphicalModelType::IndexType IndexType
Definition: inference.hxx:49
visitors::EmptyVisitor< AD3Inf< GM, ACC > > EmptyVisitorType
Definition: ad3.hxx:30
GraphicalModelType::ValueType ValueType
Definition: inference.hxx:50
Inference algorithm interface.
Definition: inference.hxx:43
ValueType valueFromMaxSum(const ValueType val) const
Definition: ad3.hxx:125
InferenceTermination arg(std::vector< LabelType > &, const size_t &=1) const
Definition: ad3.hxx:619
#define OPENGM_CHECK_OP(A, OP, B, TXT)
Definition: submodel2.hxx:24
std::string name() const
Definition: ad3.hxx:534
visitors::VerboseVisitor< AD3Inf< GM, ACC > > VerboseVisitorType
Definition: ad3.hxx:29
InferenceTermination infer()
Definition: ad3.hxx:548
#define OPENGM_CHECK(B, TXT)
Definition: submodel2.hxx:28
visitors::TimingVisitor< AD3Inf< GM, ACC > > TimingVisitorType
Definition: ad3.hxx:31
GraphicalModelType::LabelType LabelType
Definition: inference.hxx:48
OpenGM runtime error.
Definition: opengm.hxx:100
AD3Inf< _GM, ACC > type
Definition: ad3.hxx:35
InferenceTermination
Definition: inference.hxx:24