aGrUM  0.16.0
gum::ITerminalNodePolicy< GUM_SCALAR > Class Template Referenceabstract

Interface specifying the methods to be implemented by any TerminalNodePolicy. More...

#include <agrum/multidim/FunctionGraphUtilities/terminalNodePolicies/ITerminalNodePolicy.h>

+ Inheritance diagram for gum::ITerminalNodePolicy< GUM_SCALAR >:

Public Member Functions

Terminal Node Creation and Destruction
virtual void addTerminalNode (const NodeId &n, const GUM_SCALAR &v)=0
 Insert a new terminal node with given value. More...
 
virtual void eraseTerminalNode (const NodeId &n)=0
 Remove node matching given id. More...
 
virtual void clearAllTerminalNodes ()=0
 Erase all terminal nodes. More...
 
Terminal Nodes Existence
virtual bool existsTerminalNodeWithId (const NodeId &n) const =0
 Returns true if a terminal node matching this id exists. More...
 
virtual bool existsTerminalNodeWithValue (const GUM_SCALAR &v) const =0
 Returns true if a terminal node matching this value exists. More...
 
Terminal Nodes value and id access
virtual const GUM_SCALAR & terminalNodeValue (const NodeId &n) const =0
 Returns the value of the terminal node that has the given id. More...
 
virtual const NodeIdterminalNodeId (const GUM_SCALAR &v) const =0
 Returns the id of the terminal node that has the given value. More...
 
Iterator on Terminal Nodes
virtual void beginValues () const =0
 Initializes the constant safe iterator on terminal nodes. More...
 
virtual bool hasValue () const =0
 Indicates if constant safe iterator has reach end of terminal nodes list. More...
 
virtual void nextValue () const =0
 Increments the constant safe iterator. More...
 
virtual const GUM_SCALAR & value () const =0
 Returns the value of the current terminal nodes pointed by the constant safe iterator. More...
 
virtual const NodeIdid () const =0
 Returns the id of the current terminal nodes pointed by the constant safe iterator. More...
 

Detailed Description

template<typename GUM_SCALAR>
class gum::ITerminalNodePolicy< GUM_SCALAR >

Interface specifying the methods to be implemented by any TerminalNodePolicy.

Definition at line 47 of file ITerminalNodePolicy.h.

Member Function Documentation

◆ addTerminalNode()

template<typename GUM_SCALAR >
virtual void gum::ITerminalNodePolicy< GUM_SCALAR >::addTerminalNode ( const NodeId n,
const GUM_SCALAR &  v 
)
pure virtual

Insert a new terminal node with given value.

Implemented in gum::ExactTerminalNodePolicy< GUM_SCALAR >.

◆ beginValues()

template<typename GUM_SCALAR >
virtual void gum::ITerminalNodePolicy< GUM_SCALAR >::beginValues ( ) const
pure virtual

Initializes the constant safe iterator on terminal nodes.

Implemented in gum::ExactTerminalNodePolicy< GUM_SCALAR >.

◆ clearAllTerminalNodes()

template<typename GUM_SCALAR >
virtual void gum::ITerminalNodePolicy< GUM_SCALAR >::clearAllTerminalNodes ( )
pure virtual

Erase all terminal nodes.

Implemented in gum::ExactTerminalNodePolicy< GUM_SCALAR >.

◆ eraseTerminalNode()

template<typename GUM_SCALAR >
virtual void gum::ITerminalNodePolicy< GUM_SCALAR >::eraseTerminalNode ( const NodeId n)
pure virtual

Remove node matching given id.

Implemented in gum::ExactTerminalNodePolicy< GUM_SCALAR >.

◆ existsTerminalNodeWithId()

template<typename GUM_SCALAR >
virtual bool gum::ITerminalNodePolicy< GUM_SCALAR >::existsTerminalNodeWithId ( const NodeId n) const
pure virtual

Returns true if a terminal node matching this id exists.

Implemented in gum::ExactTerminalNodePolicy< GUM_SCALAR >.

◆ existsTerminalNodeWithValue()

template<typename GUM_SCALAR >
virtual bool gum::ITerminalNodePolicy< GUM_SCALAR >::existsTerminalNodeWithValue ( const GUM_SCALAR &  v) const
pure virtual

Returns true if a terminal node matching this value exists.

Implemented in gum::ExactTerminalNodePolicy< GUM_SCALAR >.

◆ hasValue()

template<typename GUM_SCALAR >
virtual bool gum::ITerminalNodePolicy< GUM_SCALAR >::hasValue ( ) const
pure virtual

Indicates if constant safe iterator has reach end of terminal nodes list.

Implemented in gum::ExactTerminalNodePolicy< GUM_SCALAR >.

◆ id()

template<typename GUM_SCALAR >
virtual const NodeId& gum::ITerminalNodePolicy< GUM_SCALAR >::id ( ) const
pure virtual

Returns the id of the current terminal nodes pointed by the constant safe iterator.

Implemented in gum::ExactTerminalNodePolicy< GUM_SCALAR >.

◆ nextValue()

template<typename GUM_SCALAR >
virtual void gum::ITerminalNodePolicy< GUM_SCALAR >::nextValue ( ) const
pure virtual

Increments the constant safe iterator.

Implemented in gum::ExactTerminalNodePolicy< GUM_SCALAR >.

◆ terminalNodeId()

template<typename GUM_SCALAR >
virtual const NodeId& gum::ITerminalNodePolicy< GUM_SCALAR >::terminalNodeId ( const GUM_SCALAR &  v) const
pure virtual

Returns the id of the terminal node that has the given value.

Implemented in gum::ExactTerminalNodePolicy< GUM_SCALAR >.

◆ terminalNodeValue()

template<typename GUM_SCALAR >
virtual const GUM_SCALAR& gum::ITerminalNodePolicy< GUM_SCALAR >::terminalNodeValue ( const NodeId n) const
pure virtual

Returns the value of the terminal node that has the given id.

Implemented in gum::ExactTerminalNodePolicy< GUM_SCALAR >.

◆ value()

template<typename GUM_SCALAR >
virtual const GUM_SCALAR& gum::ITerminalNodePolicy< GUM_SCALAR >::value ( ) const
pure virtual

Returns the value of the current terminal nodes pointed by the constant safe iterator.

Implemented in gum::ExactTerminalNodePolicy< GUM_SCALAR >.


The documentation for this class was generated from the following file: