aGrUM  0.14.2
GibbsBNdistance.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2005 by Christophe GONZALES and Pierre-Henri WUILLEMIN *
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  ***************************************************************************/
31 #ifndef GUM_GIBBS_KL2_H
32 #define GUM_GIBBS_KL2_H
33 
37 
39 
40 namespace gum {
41 
75  template < typename GUM_SCALAR >
77  : public BNdistance< GUM_SCALAR >
78  , public ApproximationScheme
79  , public GibbsOperator< GUM_SCALAR > {
80  public:
81  /* no default constructor */
82 
91  const IBayesNet< GUM_SCALAR >& Q);
92 
95  explicit GibbsBNdistance(const BNdistance< GUM_SCALAR >& kl);
96 
99 
105  void setBurnIn(Size b);
106 
111  Size burnIn() const;
112 
113  protected:
114  void _computeKL() final;
115 
121 
124 
127  };
128 
129 
130 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
131  extern template class GibbsBNdistance< double >;
132 #endif
133 
134 } // namespace gum
135 
137 
138 #endif
This file contains Gibbs sampling (for BNs) class definitions.
This file contains general scheme for iteratively convergent algorithms.
void _computeKL() final
Definition: GibbsKL_tpl.h:98
Approximation Scheme.
algorithm for KL divergence between BNs
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
Classes of signaler.
~GibbsBNdistance()
destructor
Definition: GibbsKL_tpl.h:93
KL divergence between BNs – implementation using Gibbs sampling.
GibbsKL computes the KL divergence betweens 2 BNs using an approximation pattern: GIBBS sampling...
Size burnIn() const
Returns the number of burn in.
Definition: GibbsKL_tpl.h:186
void setBurnIn(Size b)
Number of burn in for one iteration.
Definition: GibbsKL_tpl.h:181
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Definition: types.h:45
class containing all variables and methods required for Gibbssampling
Definition: gibbsOperator.h:47
GibbsBNdistance(const IBayesNet< GUM_SCALAR > &P, const IBayesNet< GUM_SCALAR > &Q)
constructor must give 2 BNs
Definition: GibbsKL_tpl.h:49