![]() |
aGrUM
0.20.3
a C++ library for (probabilistic) graphical models
|
<agrum/ID/generator/influenceDiagramGenerator.h> More...
#include <influenceDiagramGenerator.h>
Public Member Functions | |
Constructors / Destructor | |
InfluenceDiagramGenerator () | |
Default constructor. More... | |
InfluenceDiagramGenerator (ICPTGenerator< GUM_SCALAR > *cptGenerator) | |
Use this constructor if you want to use a different policy for generating CPT than the default one. More... | |
InfluenceDiagramGenerator (UTGenerator *utGenerator) | |
Use this constructor if you want to use a different policy for generating UT than the default one. More... | |
InfluenceDiagramGenerator (ICPTGenerator< GUM_SCALAR > *cptGenerator, UTGenerator *utGenerator) | |
Use this constructor if you want to use a different policy for generating both CPT & UT than the defaults ones. More... | |
~InfluenceDiagramGenerator () | |
Destructor. More... | |
ID generation methods | |
InfluenceDiagram< GUM_SCALAR > * | generateID (Size nbrNodes, GUM_SCALAR arcDensity, GUM_SCALAR chanceNodeDensity, GUM_SCALAR utilityNodeDensity, Size max_modality=2) |
Generates an influence diagram using floats. More... | |
<agrum/ID/generator/influenceDiagramGenerator.h>
Class for generating influence diagram.
This class randomly generates an influence diagram given four parameters: the number of nodes,the probability of adding an arc between two nodes, the proportion of chance node and the proportion of utility node (the proportion of decision node is deduce from thos two)
Definition at line 56 of file influenceDiagramGenerator.h.
gum::InfluenceDiagramGenerator< GUM_SCALAR >::InfluenceDiagramGenerator | ( | ) |
Default constructor.
Use the SimpleCPTGenerator for generating the IDs CPT. Use the SimpleUTGenerator for generating the IDs UT.
Definition at line 36 of file influenceDiagramGenerator_tpl.h.
|
explicit |
Use this constructor if you want to use a different policy for generating CPT than the default one.
The cptGenerator will be erased when the destructor is called.
cptGenerator | The policy used to generate CPT. |
Definition at line 47 of file influenceDiagramGenerator_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
explicit |
Use this constructor if you want to use a different policy for generating UT than the default one.
The utGenerator will be erased when the destructor is called.
utGenerator | The policy used to generate UT. |
Definition at line 59 of file influenceDiagramGenerator_tpl.h.
References gum::Set< Key, Alloc >::emplace().
gum::InfluenceDiagramGenerator< GUM_SCALAR >::InfluenceDiagramGenerator | ( | ICPTGenerator< GUM_SCALAR > * | cptGenerator, |
UTGenerator * | utGenerator | ||
) |
Use this constructor if you want to use a different policy for generating both CPT & UT than the defaults ones.
The cptGenerator and utGenerator will be erased when the destructor is called.
cptGenerator | The policy used to generate CPT. |
utGenerator | The policy used to generate UT. |
Definition at line 72 of file influenceDiagramGenerator_tpl.h.
References gum::Set< Key, Alloc >::emplace().
gum::InfluenceDiagramGenerator< GUM_SCALAR >::~InfluenceDiagramGenerator | ( | ) |
Destructor.
Definition at line 82 of file influenceDiagramGenerator_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
private |
Definition at line 154 of file influenceDiagramGenerator_tpl.h.
References gum::Set< Key, Alloc >::emplace().
InfluenceDiagram< GUM_SCALAR > * gum::InfluenceDiagramGenerator< GUM_SCALAR >::generateID | ( | Size | nbrNodes, |
GUM_SCALAR | arcDensity, | ||
GUM_SCALAR | chanceNodeDensity, | ||
GUM_SCALAR | utilityNodeDensity, | ||
Size | max_modality = 2 |
||
) |
Generates an influence diagram using floats.
nbrNodes | The number of nodes in the generated ID. |
arcDensity | The probability of adding an arc between two nodes. |
chanceNodeDensity | The proportion of chance node |
utilityNodeDensity | The proportion of utility node |
max_modality | Each DRV has from 2 to max_modality modalities |
Definition at line 97 of file influenceDiagramGenerator_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
private |
Definition at line 125 of file influenceDiagramGenerator.h.
|
private |
Definition at line 127 of file influenceDiagramGenerator.h.