30 #ifndef GUM_MULTI_DIM_FUNCTION_GRAPH_INTERFACE_TERMINAL_NODE_POLICY_H 31 #define GUM_MULTI_DIM_FUNCTION_GRAPH_INTERFACE_TERMINAL_NODE_POLICY_H 33 #include <agrum/tools/graphs/parts/nodeGraphPart.h> 46 template <
typename GUM_SCALAR>
56 virtual void addTerminalNode(
const NodeId& n,
const GUM_SCALAR& v ) = 0;
105 virtual const GUM_SCALAR&
value()
const = 0;
109 virtual const NodeId&
id()
const = 0;
Interface specifying the methods to be implemented by any TerminalNodePolicy.
virtual const GUM_SCALAR & value() const =0
Returns the value of the current terminal nodes pointed by the constant safe iterator.
virtual void clearAllTerminalNodes()=0
Erase all terminal nodes.
INLINE void emplace(Args &&... args)
virtual bool existsTerminalNodeWithValue(const GUM_SCALAR &v) const =0
Returns true if a terminal node matching this value exists.
virtual void addTerminalNode(const NodeId &n, const GUM_SCALAR &v)=0
Insert a new terminal node with given value.
virtual void beginValues() const =0
Initializes the constant safe iterator on terminal nodes.
virtual const NodeId & terminalNodeId(const GUM_SCALAR &v) const =0
Returns the id of the terminal node that has the given value.
virtual bool hasValue() const =0
Indicates if constant safe iterator has reach end of terminal nodes list.
virtual bool existsTerminalNodeWithId(const NodeId &n) const =0
Returns true if a terminal node matching this id exists.
virtual const GUM_SCALAR & terminalNodeValue(const NodeId &n) const =0
Returns the value of the terminal node that has the given id.
virtual void nextValue() const =0
Increments the constant safe iterator.
virtual const NodeId & id() const =0
Returns the id of the current terminal nodes pointed by the constant safe iterator.
virtual void eraseTerminalNode(const NodeId &n)=0
Remove node matching given id.