![]() |
aGrUM
0.20.3
a C++ library for (probabilistic) graphical models
|
Implementation of a Terminal Node Policy that maps nodeid to a set of value. More...
#include <agrum/tools/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. More... | |
void | eraseTerminalNode (const NodeId &n) |
Remove node matching given id. More... | |
void | clearAllTerminalNodes () |
Erase all terminal nodes. More... | |
Terminal Nodes Existence | |
bool | existsTerminalNodeWithId (const NodeId &n) const |
Returns true if a terminal node matching this id exists. More... | |
bool | existsTerminalNodeWithValue (const GUM_SCALAR &v) const |
Returns true if a terminal node matching this value exists. More... | |
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. More... | |
const NodeId & | terminalNodeId (const GUM_SCALAR &v) const |
Returns the id of the terminal node that has the given value. More... | |
Iterator on Terminal Nodes | |
HashTable< NodeId, GUM_SCALAR *> | _map_ |
The mapping between NodeIds and Value Sets. More... | |
HashTableConstIteratorSafe< NodeId, GUM_SCALAR *> | _mappy_ |
The mapping between NodeIds and Value Sets. More... | |
const NodeId | jocker = 0 |
The mapping between NodeIds and Value Sets. More... | |
void | beginValues () const |
Initializes the constant safe iterator on terminal nodes. More... | |
bool | hasValue () const |
Indicates if constant safe iterator has reach end of terminal nodes list. More... | |
void | nextValue () const |
Increments the constant safe iterator. More... | |
const GUM_SCALAR & | value () const |
Returns the value of the current terminal nodes pointed by the constant safe iterator. More... | |
const NodeId & | id () const |
Returns the id of the current terminal nodes pointed by the constant safe iterator. More... | |
Implementation of a Terminal Node Policy that maps nodeid to a set of value.
Definition at line 48 of file SetTerminalNodePolicy.h.
|
inline |
Definition at line 50 of file SetTerminalNodePolicy.h.
References gum::SetTerminalNodePolicy< GUM_SCALAR >::clearAllTerminalNodes().
|
inline |
Insert a new terminal node with given value.
Definition at line 58 of file SetTerminalNodePolicy.h.
|
inline |
Initializes the constant safe iterator on terminal nodes.
Definition at line 110 of file SetTerminalNodePolicy.h.
|
inline |
Erase all terminal nodes.
Definition at line 69 of file SetTerminalNodePolicy.h.
Referenced by gum::SetTerminalNodePolicy< GUM_SCALAR >::~SetTerminalNodePolicy().
|
inline |
Remove node matching given id.
Definition at line 64 of file SetTerminalNodePolicy.h.
|
inline |
Returns true if a terminal node matching this id exists.
Definition at line 82 of file SetTerminalNodePolicy.h.
|
inline |
Returns true if a terminal node matching this value exists.
Definition at line 85 of file SetTerminalNodePolicy.h.
|
inline |
Indicates if constant safe iterator has reach end of terminal nodes list.
Definition at line 113 of file SetTerminalNodePolicy.h.
|
inline |
Returns the id of the current terminal nodes pointed by the constant safe iterator.
Definition at line 124 of file SetTerminalNodePolicy.h.
|
inline |
Increments the constant safe iterator.
Definition at line 116 of file SetTerminalNodePolicy.h.
|
inline |
Returns the id of the terminal node that has the given value.
Definition at line 97 of file SetTerminalNodePolicy.h.
|
inline |
Returns the value of the terminal node that has the given id.
Definition at line 94 of file SetTerminalNodePolicy.h.
|
inline |
Returns the value of the current terminal nodes pointed by the constant safe iterator.
Definition at line 120 of file SetTerminalNodePolicy.h.
|
private |
The mapping between NodeIds and Value Sets.
Definition at line 128 of file SetTerminalNodePolicy.h.
|
mutableprivate |
The mapping between NodeIds and Value Sets.
Definition at line 129 of file SetTerminalNodePolicy.h.
|
private |
The mapping between NodeIds and Value Sets.
Definition at line 131 of file SetTerminalNodePolicy.h.