![]() |
aGrUM 3.1.1
a C++ library for (probabilistic) graphical models
|
Implementation of a Terminal Node Policy that maps nodeid to a set of value. More...
#include <agrum/base/multidim/FunctionGraphUtilities/terminalNodePolicies/SetTerminalNodePolicy.h>
Public Member Functions | |
| ~SetTerminalNodePolicy () | |
Terminal Node Creation and Destruction | |
| void | addTerminalNode (const NodeId &n, const GUM_ELEMENT &v) |
| Insert a new terminal node with given value. | |
| void | eraseTerminalNode (const NodeId &n) |
| Remove node matching given id. | |
| void | clearAllTerminalNodes () |
| Erase all terminal nodes. | |
Terminal Nodes Existence | |
| bool | existsTerminalNodeWithId (const NodeId &n) const |
| Returns true if a terminal node matching this id exists. | |
| bool | existsTerminalNodeWithValue (const GUM_ELEMENT &v) const |
| Returns true if a terminal node matching this value exists. | |
Terminal Nodes value and id access | |
| const GUM_ELEMENT & | terminalNodeValue (const NodeId &n) const |
| Returns the value of the terminal node that has the given id. | |
| const NodeId & | terminalNodeId (const GUM_ELEMENT &v) const |
| Returns the id of the terminal node that has the given value. | |
Iterator on Terminal Nodes | |
| HashTable< NodeId, GUM_ELEMENT * > | _map_ |
| The mapping between NodeIds and Value Sets. | |
| HashTableConstIteratorSafe< NodeId, GUM_ELEMENT * > | _mappy_ |
| The mapping between NodeIds and Value Sets. | |
| const NodeId | jocker = 0 |
| The mapping between NodeIds and Value Sets. | |
| void | beginValues () const |
| Initializes the constant safe iterator on terminal nodes. | |
| bool | hasValue () const |
| Indicates if constant safe iterator has reach end of terminal nodes list. | |
| void | nextValue () const |
| Increments the constant safe iterator. | |
| const GUM_ELEMENT & | value () const |
| Returns the value of the current terminal nodes pointed by the constant safe iterator. | |
| const NodeId & | id () const |
| Returns the id of the current terminal nodes pointed by the constant safe iterator. | |
Implementation of a Terminal Node Policy that maps nodeid to a set of value.
Definition at line 69 of file SetTerminalNodePolicy.h.
| gum::SetTerminalNodePolicy< GUM_ELEMENT >::~SetTerminalNodePolicy | ( | ) |
Definition at line 49 of file SetTerminalNodePolicy_tpl.h.
References clearAllTerminalNodes().
| void gum::SetTerminalNodePolicy< GUM_ELEMENT >::addTerminalNode | ( | const NodeId & | n, |
| const GUM_ELEMENT & | v ) |
Insert a new terminal node with given value.
Definition at line 54 of file SetTerminalNodePolicy_tpl.h.
References _map_.
| void gum::SetTerminalNodePolicy< GUM_ELEMENT >::beginValues | ( | ) | const |
Initializes the constant safe iterator on terminal nodes.
Definition at line 97 of file SetTerminalNodePolicy_tpl.h.
| void gum::SetTerminalNodePolicy< GUM_ELEMENT >::clearAllTerminalNodes | ( | ) |
Erase all terminal nodes.
Definition at line 66 of file SetTerminalNodePolicy_tpl.h.
References _map_.
Referenced by ~SetTerminalNodePolicy().
| void gum::SetTerminalNodePolicy< GUM_ELEMENT >::eraseTerminalNode | ( | const NodeId & | n | ) |
| bool gum::SetTerminalNodePolicy< GUM_ELEMENT >::existsTerminalNodeWithId | ( | const NodeId & | n | ) | const |
Returns true if a terminal node matching this id exists.
Definition at line 73 of file SetTerminalNodePolicy_tpl.h.
References _map_.
| bool gum::SetTerminalNodePolicy< GUM_ELEMENT >::existsTerminalNodeWithValue | ( | const GUM_ELEMENT & | v | ) | const |
Returns true if a terminal node matching this value exists.
Definition at line 78 of file SetTerminalNodePolicy_tpl.h.
| bool gum::SetTerminalNodePolicy< GUM_ELEMENT >::hasValue | ( | ) | const |
| const NodeId & gum::SetTerminalNodePolicy< GUM_ELEMENT >::id | ( | ) | const |
Returns the id of the current terminal nodes pointed by the constant safe iterator.
Definition at line 117 of file SetTerminalNodePolicy_tpl.h.
| void gum::SetTerminalNodePolicy< GUM_ELEMENT >::nextValue | ( | ) | const |
Increments the constant safe iterator.
Definition at line 107 of file SetTerminalNodePolicy_tpl.h.
References _mappy_.
| const NodeId & gum::SetTerminalNodePolicy< GUM_ELEMENT >::terminalNodeId | ( | const GUM_ELEMENT & | v | ) | const |
Returns the id of the terminal node that has the given value.
Definition at line 90 of file SetTerminalNodePolicy_tpl.h.
| const GUM_ELEMENT & gum::SetTerminalNodePolicy< GUM_ELEMENT >::terminalNodeValue | ( | const NodeId & | n | ) | const |
Returns the value of the terminal node that has the given id.
Definition at line 85 of file SetTerminalNodePolicy_tpl.h.
| const GUM_ELEMENT & gum::SetTerminalNodePolicy< GUM_ELEMENT >::value | ( | ) | const |
Returns the value of the current terminal nodes pointed by the constant safe iterator.
Definition at line 112 of file SetTerminalNodePolicy_tpl.h.
References _mappy_.
|
private |
The mapping between NodeIds and Value Sets.
Definition at line 136 of file SetTerminalNodePolicy.h.
Referenced by addTerminalNode(), beginValues(), clearAllTerminalNodes(), eraseTerminalNode(), existsTerminalNodeWithId(), hasValue(), and terminalNodeId().
|
mutableprivate |
The mapping between NodeIds and Value Sets.
Definition at line 137 of file SetTerminalNodePolicy.h.
Referenced by beginValues(), hasValue(), nextValue(), and value().
|
private |
The mapping between NodeIds and Value Sets.
Definition at line 139 of file SetTerminalNodePolicy.h.
Referenced by terminalNodeId().