aGrUM  0.13.2
maxInducedWidthMCBayesNetGenerator.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  ***************************************************************************/
27 #ifndef GUM_MAX_INDUCED_WIDTH_MC_BAYES_NET_GENERATOR
28 #define GUM_MAX_INDUCED_WIDTH_MC_BAYES_NET_GENERATOR
29 
30 #include <agrum/agrum.h>
31 
32 #include <fstream>
33 #include <iostream>
34 #include <set>
35 #include <vector>
36 
37 #include <sstream>
38 
39 #ifdef HAVE_DIRENT_H
40 # include <dirent.h>
41 #else
42 # include <agrum/core/mvsc/dirent.h>
43 #endif
44 
45 #include <agrum/BN/BayesNet.h>
50 
51 namespace gum {
70  template < typename GUM_SCALAR,
71  template < typename > class ICPTGenerator = SimpleCPTGenerator,
72  template < typename > class ICPTDisturber = SimpleCPTDisturber >
74  : public MCBayesNetGenerator< GUM_SCALAR, ICPTGenerator, ICPTDisturber > {
75  public:
76  // ############################################################################
78  // ############################################################################
80 
102  Size maxArcs,
103  Size maxModality = 2,
104  Size maxInducedWidth = 3,
105  Idx iteration = 5000,
106  Idx p = 30,
107  Idx q = 40);
108 
129  Size maxInducedWidth = 3,
130  Idx iteration = 5000,
131  Idx p = 30,
132  Idx q = 40);
133 
138 
140 
141  // ############################################################################
143  // ############################################################################
146 
152  Size maxlog10InducedWidth() const;
153 
155 
159  void setMaxlog10InducedWidth(Size maxlog10InducedWidth);
161 
162  protected:
164 
165  private:
171  bool __checkConditions() final;
172  };
173 
174 
175  extern template class MaxInducedWidthMCBayesNetGenerator< float >;
176  extern template class MaxInducedWidthMCBayesNetGenerator< double >;
177 
178 } /*namespace gum*/
179 
180 #include <agrum/BN/generator/maxInducedWidthMCBayesNetGenerator_tpl.h>
181 #endif // MCBAYESNETGENERATOR
Class representing a Bayesian Network.
Definition: BayesNet.h:76
unsigned long Size
In aGrUM, hashed values are unsigned long int.
Definition: types.h:50
Size maxModality() const
Return a constant reference to the maximum modality imposed on the IBayesNetGenerator.
Abstract class for generating Conditional Probability Tables.
Source implementation of SimpleCPTDisturber.
<agrum/BN/generator/MCayesNetGenerator.h>
Class representing Bayesian networks.
MaxInducedWidthMCBayesNetGenerator(Size nbrNodes, Size maxArcs, Size maxModality=2, Size maxInducedWidth=3, Idx iteration=5000, Idx p=30, Idx q=40)
Constructor.
gum is the global namespace for all aGrUM entities
Definition: agrum.h:25
Size nbrNodes() const
Return a constant reference to the number of nodes imposed on the IBayesNetGenerator.
void setMaxlog10InducedWidth(Size maxlog10InducedWidth)
Modifies the value of the number of maximum parents imposed on the BayesNetGenerator.
Idx p() const
Return a constant reference to the probabilité p imposed on the Markov Chain BayesNetGenerator.
Size iteration() const
Return a constant reference to the number of iteration imposed on the Markov Chain BayesNetGenerator...
Size maxArcs() const
Return a constant reference to the maximum number of arcs imposed on the IBayesNetGenerator.
Size maxlog10InducedWidth() const
Return a constant reference to the number of maximum parents imposed on the Markov Chain BayesNetGene...
unsigned long Idx
Type for indexes.
Definition: types.h:43
Idx q() const
Return a constant reference to the probabilité imposed on the Markov Chain BayesNetGenerator.
Class for generating bayesian networks.using MC algorithm cf.
Base class for labelized discrete random variables.
maxInducedWidthMCBayesNetGenerator.h <agrum/BN/generator/SimpleMCayesNetGenerator.h>
bool __checkConditions() final
function to holding the the specification wanted for the Bayesian markov.