![]() |
aGrUM
0.14.2
|
<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 53 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 33 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 44 of file influenceDiagramGenerator_tpl.h.
|
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 56 of file influenceDiagramGenerator_tpl.h.
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 70 of file influenceDiagramGenerator_tpl.h.
gum::InfluenceDiagramGenerator< GUM_SCALAR >::~InfluenceDiagramGenerator | ( | ) |
Destructor.
Definition at line 79 of file influenceDiagramGenerator_tpl.h.
|
private |
Definition at line 159 of file influenceDiagramGenerator_tpl.h.
References gum::InfluenceDiagram< GUM_SCALAR >::addArc(), gum::SequenceImplementation< Key, Alloc, Gen >::begin(), gum::InfluenceDiagram< GUM_SCALAR >::decisionOrderExists(), gum::SequenceImplementation< Key, Alloc, Gen >::end(), gum::InfluenceDiagram< GUM_SCALAR >::isDecisionNode(), and gum::DAGmodel::topologicalOrder().
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 94 of file influenceDiagramGenerator_tpl.h.
References gum::InfluenceDiagram< GUM_SCALAR >::addArc(), gum::InfluenceDiagram< GUM_SCALAR >::addChanceNode(), gum::InfluenceDiagram< GUM_SCALAR >::addDecisionNode(), gum::InfluenceDiagram< GUM_SCALAR >::addUtilityNode(), gum::InfluenceDiagram< GUM_SCALAR >::cpt(), gum::InfluenceDiagram< GUM_SCALAR >::isChanceNode(), gum::InfluenceDiagram< GUM_SCALAR >::isUtilityNode(), gum::InfluenceDiagram< GUM_SCALAR >::utility(), and gum::InfluenceDiagram< GUM_SCALAR >::variable().
|
private |
Definition at line 123 of file influenceDiagramGenerator.h.
|
private |
Definition at line 125 of file influenceDiagramGenerator.h.