aGrUM  0.13.2
loopySamplingInference.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2005 by Pierre-Henri WUILLEMIN et Christophe GONZALES *
3  * {prenom.nom}_at_lip6.fr *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
29 #ifndef GUM_LOOPY_INFERENCE_H
30 #define GUM_LOOPY_INFERENCE_H
37 
38 namespace gum {
39 
55  template < typename GUM_SCALAR, template < typename > class APPROX >
56  class LoopySamplingInference : public APPROX< GUM_SCALAR > {
57  public:
62 
66  virtual ~LoopySamplingInference();
67 
70  virtual void _makeInference();
71 
72  void setVirtualLBPSize(GUM_SCALAR vlbpsize) {
73  if (vlbpsize > 0) _virtualLBPSize = vlbpsize;
74  };
75 
76  protected:
77  GUM_SCALAR _virtualLBPSize;
78  };
79 
82 
85 
88 
91 
92  template < typename GUM_SCALAR >
95  template < typename GUM_SCALAR >
98  template < typename GUM_SCALAR >
101  template < typename GUM_SCALAR >
103 } // namespace gum
104 
106 #endif
This file contains general methods for approximate inference.
This file contains Monte Carlo sampling class definition.
Class representing the minimal interface for Bayesian Network.
Definition: IBayesNet.h:59
gum is the global namespace for all aGrUM entities
Definition: agrum.h:25
This file contains the abstract inference class definition for computing (incrementally) marginal pos...
This file contains Weighted sampling class definition.
virtual ~LoopySamplingInference()
destructor
This file contains Importance sampling class definition.
This file contains Gibbs sampling class definition.
virtual void _makeInference()
makes the inference by generating samples w.r.t the mother class&#39; sampling method after initalizing e...
LoopySamplingInference(const IBayesNet< GUM_SCALAR > *bn)
Default constructor.
<agrum/BN/inference/loopySamplingInference.h>
void setVirtualLBPSize(GUM_SCALAR vlbpsize)
Implements approximate inference algorithms from Loopy Belief Propagation.