27 #ifndef GUM_MULTI_DIM_FUNCTION_GRAPH_EXACT_TERMINAL_NODE_POLICY_H 28 #define GUM_MULTI_DIM_FUNCTION_GRAPH_EXACT_TERMINAL_NODE_POLICY_H 46 template <
typename GUM_SCALAR >
Interface specifying the methods to be implemented by any TerminalNodePolicy.
void insert(const T1 &first, const T2 &second)
Inserts a new association in the gum::Bijection.
Base node set class for graphs.
const T2 & second(const T1 &first) const
Returns the second value of a pair given its first value.
void clear()
Removes all the associations from the gum::Bijection.
void nextValue() const
Increments the constant safe iterator.
void beginValues() const
Initializes the constant safe iterator on terminal nodes.
void clearAllTerminalNodes()
Erase all terminal nodes.
const T1 & first(const T2 &second) const
Returns the first value of a pair given its second value.
const NodeId & id() const
Returns the id of the current terminal nodes pointed by the constant safe iterator.
void eraseFirst(const T1 &first)
Erases an association containing the given first element.
void eraseTerminalNode(const NodeId &n)
Remove node matching given id.
const NodeId & terminalNodeId(const GUM_SCALAR &v) const
Returns the id of the terminal node that has the given value.
gum is the global namespace for all aGrUM entities
Headers of the ITerminalNodePolicy.
bool existsSecond(const T2 &second) const
Returns true if second is the second element in a pair in the gum::Bijection.
bool existsTerminalNodeWithValue(const GUM_SCALAR &v) const
Returns true if a terminal node matching this value exists.
bool existsFirst(const T1 &first) const
Returns true if first is the first element in a pair in the gum::Bijection.
void addTerminalNode(const NodeId &n, const GUM_SCALAR &v)
Insert a new terminal node with given value.
bool hasValue() const
Indicates if constant safe iterator has reach end of terminal nodes list.
Bijection< NodeId, GUM_SCALAR > __map
iterator_safe beginSafe() const
Returns the safe iterator at the beginning of the gum::Bijection.
const GUM_SCALAR & terminalNodeValue(const NodeId &n) const
Returns the value of the terminal node that has the given id.
BijectionIteratorSafe< NodeId, GUM_SCALAR > __mappy
const T2 & second() const
Returns the second element of the current association.
bool existsTerminalNodeWithId(const NodeId &n) const
Returns true if a terminal node matching this id exists.
const iterator_safe & endSafe() const noexcept
Returns the safe iterator at the end of the gum::Bijection.
Implementation of a Terminal Node Policy that maps nodeid directly to value.
const GUM_SCALAR & value() const
Returns the value of the current terminal nodes pointed by the constant safe iterator.
Size NodeId
Type for node ids.
Set of pairs of elements with fast search for both elements.
const T1 & first() const
Returns the first element of the current association.