![]() |
aGrUM
0.20.3
a C++ library for (probabilistic) graphical models
|
#include <multiDimFunctionGraph.h>
Public Member Functions | |
void | clean () |
Removes var without nodes in the diagram. More... | |
Inherited methods | |
virtual NodeId | addInternalNode (const DiscreteVariable *var, NodeId *sons) |
Inserts a new non terminal node in graph. More... | |
virtual void | reduce () |
Ensures that every isomorphic subgraphs are merged together. More... | |
Protected Member Functions | |
Redundancy methods. | |
NodeId | nodeRedundancyCheck_ (const DiscreteVariable *var, NodeId *sonsMap) |
Check for redundancy. More... | |
void | reduce_ () |
Ensures that every isomorphic subgraphs are merged together. More... | |
Friends | |
MultiDimFunctionGraphManager< GUM_SCALAR, TerminalNodePolicy > * | MultiDimFunctionGraph () |
This friend methods from is the only way to get an instance of a manager. More... | |
Nodes manipulation methods. | |
void | setRootNode (const NodeId &root) |
Sets root node of decision diagram. More... | |
NodeId | addInternalNode (const DiscreteVariable *var) |
Inserts a new non terminal node in graph. More... | |
NodeId | addInternalNode (const DiscreteVariable *var, NodeId nid) |
Inserts a new non terminal node in graph. More... | |
NodeId | addTerminalNode (const GUM_SCALAR &value) |
Adds a value to the MultiDimFunctionGraph. More... | |
void | eraseNode (NodeId id, NodeId replacingId=0, bool updateParents=true) |
Erases a node from the diagram. More... | |
NodeId | addInternalNode_ (const DiscreteVariable *var, NodeId *sons) |
Adds an internal node. More... | |
Manipulation methods. | |
void | setSon (const NodeId &node, const Idx &modality, const NodeId &sonNode) |
Sets nodes son for given modality to designated son node. More... | |
void | minimizeSize () |
Performs a sifting in search of a(local) minimal size. More... | |
void | moveTo (const DiscreteVariable *x, Idx desiredPos) |
Changes var position in variable sequence. More... | |
void | migrateNode_ (const NodeId &x, const NodeId &y) |
Remaps all arcs going to ou going from the first given node to the second node, then delete first node. More... | |
Constructor and destructor | |
MultiDimFunctionGraphROManager (MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy > *master) | |
~MultiDimFunctionGraphROManager () | |
Definition at line 55 of file multiDimFunctionGraph.h.
|
private |
Definition at line 578 of file multiDimFunctionGraphManager_tpl.h.
References gum::Set< Key, Alloc >::emplace().
gum::MultiDimFunctionGraphROManager< GUM_SCALAR, TerminalNodePolicy >::~MultiDimFunctionGraphROManager | ( | ) |
Definition at line 586 of file multiDimFunctionGraphManager_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
inherited |
Inserts a new non terminal node in graph.
NodeId of this node is generated automatically.
var | Associated variable |
Definition at line 75 of file multiDimFunctionGraphManager_tpl.h.
|
inherited |
Inserts a new non terminal node in graph.
NodeId of this node is generated automatically.
var | The ssociated variable. |
nid | The desired id for that node. |
OperationNotAllowed | Raised if MultiDimFunctionGraph has no variable yet. |
Definition at line 62 of file multiDimFunctionGraphManager_tpl.h.
|
virtual |
Inserts a new non terminal node in graph.
NodeId of this node is generated automatically.
var | The associated variable. |
sons | A table of size var->domainSize() containing nodeid of sons nodes. |
OperationNotAllowed | Raised if MultiDimFunctionGraph has no variable yet. |
Implements gum::MultiDimFunctionGraphManager< GUM_SCALAR, TerminalNodePolicy >.
Definition at line 591 of file multiDimFunctionGraphManager_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
protectedinherited |
Adds an internal node.
var | The node to add. |
sons | The node sons. |
Definition at line 86 of file multiDimFunctionGraphManager_tpl.h.
|
inherited |
Adds a value to the MultiDimFunctionGraph.
This will create a terminal node, which of id is returned. If a terminal node with such value already exists, its id will be return instead.
value | The value added by copy. |
Definition at line 102 of file multiDimFunctionGraphManager_tpl.h.
|
inherited |
Removes var without nodes in the diagram.
Definition at line 537 of file multiDimFunctionGraphManager_tpl.h.
|
inherited |
Erases a node from the diagram.
id | The id of the variable to erase. |
replacingId | Offers the possibility to reroute any parent to the given node. |
updateParents | Indicates if such remapping has to be done. |
NotFound | Raised if node isn't in diagram. |
Definition at line 115 of file multiDimFunctionGraphManager_tpl.h.
|
protectedinherited |
Remaps all arcs going to ou going from the first given node to the second node, then delete first node.
x | The variable from which all arcs are removed. |
y | The variable for which all of x arcs are added. |
Definition at line 392 of file multiDimFunctionGraphManager_tpl.h.
|
inherited |
Performs a sifting in search of a(local) minimal size.
Definition at line 204 of file multiDimFunctionGraphManager_tpl.h.
|
inherited |
Changes var position in variable sequence.
x | The varaible to change. |
desiredPos | The new posiition. |
Definition at line 261 of file multiDimFunctionGraphManager_tpl.h.
|
protectedinherited |
Check for redundancy.
Checks if a similar node does not already exists in the graph or if it has the same child for every variable value. If no node is a match, this node is added to the graph.
var | The node to add in the graph. |
sonsMap | The node sons. |
Definition at line 419 of file multiDimFunctionGraphManager_tpl.h.
|
virtual |
Ensures that every isomorphic subgraphs are merged together.
Implements gum::MultiDimFunctionGraphManager< GUM_SCALAR, TerminalNodePolicy >.
Definition at line 598 of file multiDimFunctionGraphManager_tpl.h.
References gum::Set< Key, Alloc >::emplace().
|
protectedinherited |
Ensures that every isomorphic subgraphs are merged together.
Definition at line 474 of file multiDimFunctionGraphManager_tpl.h.
|
inherited |
Sets root node of decision diagram.
root | The node to set as root. |
Definition at line 55 of file multiDimFunctionGraphManager_tpl.h.
|
inherited |
Sets nodes son for given modality to designated son node.
node | The node to which a node is added. |
modality | The modality for which sonNode is added to node. |
sonNode | The node to add as a son to node. |
Definition at line 162 of file multiDimFunctionGraphManager_tpl.h.
|
friend |
This friend methods from is the only way to get an instance of a manager.