30 #ifndef GUM_MULTI_DIM_FUNCTION_GRAPH_SET_TERMINAL_NODE_POLICY_H 31 #define GUM_MULTI_DIM_FUNCTION_GRAPH_SET_TERMINAL_NODE_POLICY_H 47 template <
typename GUM_SCALAR >
72 delete nodeIter.val();
107 if (*(nodeIter.val()) == v)
return nodeIter.key();
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
const mapped_type & val() const
Returns the mapped value pointed to by the iterator.
const iterator_safe & endSafe() noexcept
Returns the safe iterator pointing to the end of the hashtable.
const GUM_SCALAR & value() const
Returns the value of the current terminal nodes pointed by the constant safe iterator.
const key_type & key() const
Returns the key pointed to by the iterator.
void erase(const Key &key)
Removes a given element from the hash table.
HashTable< NodeId, GUM_SCALAR *> __map
The mapping between NodeIds and Value Sets.
const_iterator_safe cbeginSafe() const
Returns the safe const_iterator pointing to the beginning of the hashtable.
const GUM_SCALAR & terminalNodeValue(const NodeId &n) const
Returns the value of the terminal node that has the given id.
HashTableConstIteratorSafe< NodeId, GUM_SCALAR *> __mappy
The mapping between NodeIds and Value Sets.
bool exists(const Key &key) const
Checks whether there exists an element with a given key in the hashtable.
const NodeId & id() const
Returns the id of the current terminal nodes pointed by the constant safe iterator.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
void eraseTerminalNode(const NodeId &n)
Remove node matching given id.
const const_iterator_safe & cendSafe() const noexcept
Returns the safe const_iterator pointing to the end of the hashtable.
const NodeId jocker
The mapping between NodeIds and Value Sets.
const NodeId & terminalNodeId(const GUM_SCALAR &v) const
Returns the id of the terminal node that has the given value.
Implementation of a Terminal Node Policy that maps nodeid to a set of value.
bool hasValue() const
Indicates if constant safe iterator has reach end of terminal nodes list.
void beginValues() const
Initializes the constant safe iterator on terminal nodes.
void clear()
Removes all the elements in the hash table.
iterator_safe beginSafe()
Returns the safe iterator pointing to the beginning of the hashtable.
bool existsTerminalNodeWithId(const NodeId &n) const
Returns true if a terminal node matching this id exists.
void nextValue() const
Increments the constant safe iterator.
void addTerminalNode(const NodeId &n, const GUM_SCALAR &v)
Insert a new terminal node with given value.
bool existsTerminalNodeWithValue(const GUM_SCALAR &v) const
Returns true if a terminal node matching this value exists.
value_type & insert(const Key &key, const Val &val)
Adds a new element (actually a copy of this element) into the hash table.
Size NodeId
Type for node ids.
void clearAllTerminalNodes()
Erase all terminal nodes.