![]() |
aGrUM 3.1.1
a C++ library for (probabilistic) graphical models
|
Implementation of a Terminal Node Policy that maps nodeid directly to value. More...
#include <agrum/base/multidim/FunctionGraphUtilities/terminalNodePolicies/ExactTerminalNodePolicy.h>
Public Member Functions | |
Terminal Node Creation and Destruction | |
| void | addTerminalNode (const NodeId &n, const GUM_ELEMENT &v) override |
| Insert a new terminal node with given value. | |
| void | eraseTerminalNode (const NodeId &n) override |
| Remove node matching given id. | |
| void | clearAllTerminalNodes () override |
| Erase all terminal nodes. | |
Terminal Nodes Existence | |
| bool | existsTerminalNodeWithId (const NodeId &n) const override |
| Returns true if a terminal node matching this id exists. | |
| bool | existsTerminalNodeWithValue (const GUM_ELEMENT &v) const override |
| Returns true if a terminal node matching this value exists. | |
Terminal Nodes value and id access | |
| const GUM_ELEMENT & | terminalNodeValue (const NodeId &n) const override |
| Returns the value of the terminal node that has the given id. | |
| const NodeId & | terminalNodeId (const GUM_ELEMENT &v) const override |
| Returns the id of the terminal node that has the given value. | |
Iterator on Terminal Nodes | |
| void | beginValues () const override |
| Initializes the constant safe iterator on terminal nodes. | |
| bool | hasValue () const override |
| Indicates if constant safe iterator has reach end of terminal nodes list. | |
| void | nextValue () const override |
| Increments the constant safe iterator. | |
| const GUM_ELEMENT & | value () const override |
| Returns the value of the current terminal nodes pointed by the constant safe iterator. | |
| const NodeId & | id () const override |
| Returns the id of the current terminal nodes pointed by the constant safe iterator. | |
Private Attributes | |
| Bijection< NodeId, GUM_ELEMENT > | _map_ |
| BijectionIteratorSafe< NodeId, GUM_ELEMENT > | _mappy_ |
Implementation of a Terminal Node Policy that maps nodeid directly to value.
Definition at line 69 of file ExactTerminalNodePolicy.h.
|
overridevirtual |
Insert a new terminal node with given value.
Implements gum::ITerminalNodePolicy< GUM_ELEMENT >.
Definition at line 49 of file ExactTerminalNodePolicy_tpl.h.
References _map_.
|
overridevirtual |
Initializes the constant safe iterator on terminal nodes.
Implements gum::ITerminalNodePolicy< GUM_ELEMENT >.
Definition at line 87 of file ExactTerminalNodePolicy_tpl.h.
|
overridevirtual |
Erase all terminal nodes.
Implements gum::ITerminalNodePolicy< GUM_ELEMENT >.
Definition at line 60 of file ExactTerminalNodePolicy_tpl.h.
References _map_.
Referenced by gum::MultiDimFunctionGraph< GUM_ELEMENT, TerminalNodePolicy >::clear().
|
overridevirtual |
Remove node matching given id.
Implements gum::ITerminalNodePolicy< GUM_ELEMENT >.
Definition at line 55 of file ExactTerminalNodePolicy_tpl.h.
References _map_.
|
overridevirtual |
Returns true if a terminal node matching this id exists.
Implements gum::ITerminalNodePolicy< GUM_ELEMENT >.
Definition at line 65 of file ExactTerminalNodePolicy_tpl.h.
References _map_.
Referenced by gum::MultiDimFunctionGraph< GUM_ELEMENT, TerminalNodePolicy >::isTerminalNode().
|
overridevirtual |
Returns true if a terminal node matching this value exists.
Implements gum::ITerminalNodePolicy< GUM_ELEMENT >.
Definition at line 70 of file ExactTerminalNodePolicy_tpl.h.
References _map_.
|
overridevirtual |
Indicates if constant safe iterator has reach end of terminal nodes list.
Implements gum::ITerminalNodePolicy< GUM_ELEMENT >.
Definition at line 92 of file ExactTerminalNodePolicy_tpl.h.
|
overridevirtual |
Returns the id of the current terminal nodes pointed by the constant safe iterator.
Implements gum::ITerminalNodePolicy< GUM_ELEMENT >.
Definition at line 107 of file ExactTerminalNodePolicy_tpl.h.
References _mappy_.
|
overridevirtual |
Increments the constant safe iterator.
Implements gum::ITerminalNodePolicy< GUM_ELEMENT >.
Definition at line 97 of file ExactTerminalNodePolicy_tpl.h.
References _mappy_.
|
overridevirtual |
Returns the id of the terminal node that has the given value.
Implements gum::ITerminalNodePolicy< GUM_ELEMENT >.
Definition at line 82 of file ExactTerminalNodePolicy_tpl.h.
|
overridevirtual |
Returns the value of the terminal node that has the given id.
Implements gum::ITerminalNodePolicy< GUM_ELEMENT >.
Definition at line 77 of file ExactTerminalNodePolicy_tpl.h.
Referenced by gum::MultiDimFunctionGraph< GUM_ELEMENT, TerminalNodePolicy >::get(), gum::MultiDimFunctionGraph< GUM_ELEMENT, TerminalNodePolicy >::nodeValue(), and gum::MultiDimFunctionGraph< GUM_ELEMENT, TerminalNodePolicy >::toDot().
|
overridevirtual |
Returns the value of the current terminal nodes pointed by the constant safe iterator.
Implements gum::ITerminalNodePolicy< GUM_ELEMENT >.
Definition at line 102 of file ExactTerminalNodePolicy_tpl.h.
References _mappy_.
Referenced by gum::MultiDimFunctionGraph< GUM_ELEMENT, TerminalNodePolicy >::set().
|
private |
Definition at line 135 of file ExactTerminalNodePolicy.h.
Referenced by addTerminalNode(), beginValues(), clearAllTerminalNodes(), eraseTerminalNode(), existsTerminalNodeWithId(), and existsTerminalNodeWithValue().
|
mutableprivate |
Definition at line 136 of file ExactTerminalNodePolicy.h.
Referenced by beginValues(), id(), nextValue(), and value().