![]() |
aGrUM 2.3.2
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_SCALAR &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_SCALAR &v) const |
| Returns true if a terminal node matching this value exists. | |
Terminal Nodes value and id access | |
| const GUM_SCALAR & | terminalNodeValue (const NodeId &n) const |
| Returns the value of the terminal node that has the given id. | |
| const NodeId & | terminalNodeId (const GUM_SCALAR &v) const |
| Returns the id of the terminal node that has the given value. | |
Iterator on Terminal Nodes | |
| HashTable< NodeId, GUM_SCALAR * > | _map_ |
| The mapping between NodeIds and Value Sets. | |
| HashTableConstIteratorSafe< NodeId, GUM_SCALAR * > | _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_SCALAR & | 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.
|
inline |
Definition at line 71 of file SetTerminalNodePolicy.h.
References clearAllTerminalNodes().
|
inline |
Insert a new terminal node with given value.
Definition at line 79 of file SetTerminalNodePolicy.h.
References _map_.
|
inline |
Initializes the constant safe iterator on terminal nodes.
Definition at line 131 of file SetTerminalNodePolicy.h.
|
inline |
Erase all terminal nodes.
Definition at line 90 of file SetTerminalNodePolicy.h.
References _map_.
Referenced by ~SetTerminalNodePolicy().
|
inline |
|
inline |
Returns true if a terminal node matching this id exists.
Definition at line 103 of file SetTerminalNodePolicy.h.
References _map_.
|
inline |
Returns true if a terminal node matching this value exists.
Definition at line 106 of file SetTerminalNodePolicy.h.
References terminalNodeId().
|
inline |
|
inline |
Returns the id of the current terminal nodes pointed by the constant safe iterator.
Definition at line 145 of file SetTerminalNodePolicy.h.
References _mappy_.
|
inline |
Increments the constant safe iterator.
Definition at line 137 of file SetTerminalNodePolicy.h.
References _mappy_.
|
inline |
Returns the id of the terminal node that has the given value.
Definition at line 118 of file SetTerminalNodePolicy.h.
Referenced by existsTerminalNodeWithValue().
|
inline |
Returns the value of the terminal node that has the given id.
Definition at line 115 of file SetTerminalNodePolicy.h.
References _map_.
|
inline |
Returns the value of the current terminal nodes pointed by the constant safe iterator.
Definition at line 141 of file SetTerminalNodePolicy.h.
References _mappy_.
|
private |
The mapping between NodeIds and Value Sets.
Definition at line 149 of file SetTerminalNodePolicy.h.
Referenced by addTerminalNode(), beginValues(), clearAllTerminalNodes(), eraseTerminalNode(), existsTerminalNodeWithId(), hasValue(), terminalNodeId(), and terminalNodeValue().
|
mutableprivate |
The mapping between NodeIds and Value Sets.
Definition at line 150 of file SetTerminalNodePolicy.h.
Referenced by beginValues(), hasValue(), id(), nextValue(), and value().
|
private |
The mapping between NodeIds and Value Sets.
Definition at line 152 of file SetTerminalNodePolicy.h.
Referenced by terminalNodeId().