![]() |
aGrUM
0.20.3
a C++ library for (probabilistic) graphical models
|
<agrum/BN/generator/simpleBayesNetGenerator.h> More...
#include <simpleBayesNetGenerator.h>
Public Member Functions | |
Constructors / Destructor | |
SimpleBayesNetGenerator (Size nbrNodes, Size maxArcs, Size maxModality=2) | |
Constructor. More... | |
~SimpleBayesNetGenerator () override | |
Destructor. More... | |
BN generation methods | |
void | generateBN (BayesNet< GUM_SCALAR > &bayesNet) override |
function that generates a Bayesian networks. More... | |
BN generation methods | |
void | fillCPT () |
function that insert random values in the CPT of each nodes according to the CPTGenerator. More... | |
Getters | |
Size | nbrNodes () const |
Return a constant reference to the number of nodes imposed on the IBayesNetGenerator. More... | |
Size | maxArcs () const |
Return a constant reference to the maximum number of arcs imposed on the IBayesNetGenerator. More... | |
Size | maxModality () const |
Return a constant reference to the maximum modality imposed on the IBayesNetGenerator. More... | |
Setters | |
void | setNbrNodes (Size nbrNodes) |
Modifies the value of the number of nodes imposed on the BayesGenerator. More... | |
void | setMaxArcs (Size maxArcs) |
Modifies the value of the number of nodes imposed on the BayesGenerator. More... | |
void | setMaxModality (Size maxModality) |
Modifies the value of the number of nodes imposed on the BayesGenerator. More... | |
Protected Attributes | |
Size | nbrNodes_ |
Size | maxArcs_ |
Size | maxModality_ |
BayesNet< GUM_SCALAR > | bayesNet_ |
<agrum/BN/generator/simpleBayesNetGenerator.h>
Class for generating Bayesian networks.
This class randomly generates a Bayesian network given three parameters: the number of nodes and the max number of arcs and the number of maximum modality for each nodes.
Definition at line 57 of file simpleBayesNetGenerator.h.
INLINE gum::SimpleBayesNetGenerator< GUM_SCALAR, ICPTGenerator >::SimpleBayesNetGenerator | ( | Size | nbrNodes, |
Size | maxArcs, | ||
Size | maxModality = 2 |
||
) |
Constructor.
Use by default the SimpleCPTGenerator for generating the BNs CPT.
nbrNodes | The number of nodes imposed on the generator. |
maxArcs | The number of maximum arcs imposed on the generator. |
maxModality | Each DRV has from 2 to maxModality modalities |
Definition at line 41 of file simpleBayesNetGenerator_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
override |
Destructor.
Definition at line 63 of file simpleBayesNetGenerator_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
inherited |
function that insert random values in the CPT of each nodes according to the CPTGenerator.
Definition at line 62 of file IBayesNetGenerator_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
overridevirtual |
function that generates a Bayesian networks.
bayesNet | Bayesian network to be completed after initialisation |
Implements gum::IBayesNetGenerator< GUM_SCALAR, ICPTGenerator >.
Definition at line 73 of file simpleBayesNetGenerator_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
inherited |
Return a constant reference to the maximum number of arcs imposed on the IBayesNetGenerator.
Definition at line 78 of file IBayesNetGenerator_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
inherited |
Return a constant reference to the maximum modality imposed on the IBayesNetGenerator.
Definition at line 68 of file IBayesNetGenerator_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
inherited |
Return a constant reference to the number of nodes imposed on the IBayesNetGenerator.
Definition at line 73 of file IBayesNetGenerator_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
inherited |
Modifies the value of the number of nodes imposed on the BayesGenerator.
Definition at line 98 of file IBayesNetGenerator_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
inherited |
Modifies the value of the number of nodes imposed on the BayesGenerator.
Definition at line 83 of file IBayesNetGenerator_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
inherited |
Modifies the value of the number of nodes imposed on the BayesGenerator.
Definition at line 90 of file IBayesNetGenerator_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
protectedinherited |
Definition at line 166 of file IBayesNetGenerator.h.
|
protectedinherited |
Definition at line 164 of file IBayesNetGenerator.h.
|
protectedinherited |
Definition at line 165 of file IBayesNetGenerator.h.
|
protectedinherited |
Definition at line 163 of file IBayesNetGenerator.h.