aGrUM  0.15.1
IBayesNetGenerator.h
Go to the documentation of this file.
1 
29 #ifndef GUM_I_BAYES_NET_GENERATOR_H
30 #define GUM_I_BAYES_NET_GENERATOR_H
31 
32 #include <climits>
33 #include <cstdio>
34 #include <cstdlib>
35 #include <iostream>
36 #include <vector>
37 
38 #include <agrum/BN/BayesNet.h>
40 #include <agrum/agrum.h>
41 
43 
45 
46 namespace gum {
47 
62  template < typename GUM_SCALAR, template < typename > class ICPTGenerator >
63  class IBayesNetGenerator : public ICPTGenerator< GUM_SCALAR > {
64  public:
65  // ############################################################################
67  // ############################################################################
69 
83 
88  virtual ~IBayesNetGenerator();
90 
91  // ############################################################################
93  // ############################################################################
95 
102  virtual void generateBN(BayesNet< GUM_SCALAR >& bayesNet) = 0;
103 
111  void fillCPT();
112 
114  // ===========================================================================
116  // ===========================================================================
118 
126  Size nbrNodes() const;
127 
132  Size maxArcs() const;
133 
138  Size maxModality() const;
139 
144  // void setcptGenerator(CPTGenerator * cptGenerator);
148  void setNbrNodes(Size nbrNodes);
149 
153  void setMaxArcs(Size maxArcs);
154 
158  void setMaxModality(Size maxModality);
159 
161  protected:
162  // The Conditional Probability Table generator
163  // CPTGenerator * _cptGenerator;
168  };
169 
170 } /* namespace gum */
171 
173 
174 #endif /* GUM_I_BAYES_NET_GENERATOR_H */
Class representing a Bayesian Network.
Definition: BayesNet.h:78
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
void fillCPT()
function that insert random values in the CPT of each nodes according to the CPTGenerator.
Class for generating bayesian networks.
IBayesNetGenerator(Size nbrNodes, Size maxArcs, Size maxModality)
constructor.
void setNbrNodes(Size nbrNodes)
Modifies the value of the number of nodes imposed on the BayesGenerator.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Size nbrNodes() const
Return a constant reference to the number of nodes imposed on the IBayesNetGenerator.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Definition: agrum.h:25
void setMaxArcs(Size maxArcs)
Modifies the value of the number of nodes imposed on the BayesGenerator.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
BayesNet< GUM_SCALAR > _bayesNet
Size maxArcs() const
Return a constant reference to the maximum number of arcs imposed on the IBayesNetGenerator.
virtual ~IBayesNetGenerator()
Destructor.
virtual void generateBN(BayesNet< GUM_SCALAR > &bayesNet)=0
Virtual function that Generates a bayesian networks.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Definition: types.h:48
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Size maxModality() const
Return a constant reference to the maximum modality imposed on the IBayesNetGenerator.
void setMaxModality(Size maxModality)
Modifies the value of the number of nodes imposed on the BayesGenerator.