DiaDes  0.1
DIAgnosis of Discrete-Event System
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
Diades::Graph::GraphNodeSetTable< T > Class Template Reference

#include <GraphNodeSetTable.hh>

Public Types

typedef Diades::Utils::Exception< GraphNodeSetTableException
 
using Children = typename NodeElement< T >::Children
 
using NdElement = NodeElement< T >
 

Public Member Functions

 GraphNodeSetTable ()
 info object that is returned in case an specific info is not found, undetermined value More...
 
 ~GraphNodeSetTable ()
 
const T & getInfo (const GraphNodeSet &ns, bool &found) const
 
T & getInfo (const GraphNodeSet &ns, bool &found)
 
T & insertIfNotFound (const GraphNodeSet &ns, const T &info, bool &found)
 

Static Public Member Functions

static string typeName ()
 

Private Attributes

NdElement _root
 
_defaultInfo
 root of the tree, if it is tagged then it encodes the presence of the empty set More...
 

Detailed Description

template<typename T>
class Diades::Graph::GraphNodeSetTable< T >

A GraphNodeSetTable is a container that represents GraphNodeSet objects. The main idea is to provide an efficient data sructure to test the existence of a GraphNodeSet in a set of GraphNodeSet objects. Each GraphNodeSet is associated with an information that can be efficiently retrieved from a given GraphNodeSet. A GraphNodeSetTable is a list of NodeElement's trees. A GraphNodeSet is represented by an ordered sequence of NodeElement objects between the roots and a NodeElement that is tagged. The information associated to the GraphNodeSet is associated to the NodeElement that is tagged.

Definition at line 229 of file GraphNodeSetTable.hh.

Member Typedef Documentation

◆ Children

template<typename T >
using Diades::Graph::GraphNodeSetTable< T >::Children = typename NodeElement<T>::Children

Definition at line 236 of file GraphNodeSetTable.hh.

◆ Exception

Definition at line 235 of file GraphNodeSetTable.hh.

◆ NdElement

template<typename T >
using Diades::Graph::GraphNodeSetTable< T >::NdElement = NodeElement<T>

Definition at line 237 of file GraphNodeSetTable.hh.

Constructor & Destructor Documentation

◆ GraphNodeSetTable()

template<typename T >
Diades::Graph::GraphNodeSetTable< T >::GraphNodeSetTable ( )
inline

info object that is returned in case an specific info is not found, undetermined value

Default constructor Make an empty table

Definition at line 247 of file GraphNodeSetTable.hh.

◆ ~GraphNodeSetTable()

template<typename T >
Diades::Graph::GraphNodeSetTable< T >::~GraphNodeSetTable ( )
inline

Destructor

Definition at line 253 of file GraphNodeSetTable.hh.

Member Function Documentation

◆ getInfo() [1/2]

template<typename T >
const T& Diades::Graph::GraphNodeSetTable< T >::getInfo ( const GraphNodeSet ns,
bool &  found 
) const
inline
Parameters
nsa GraphNodeSet
founda Boolean that indicates if 'ns' is present or not
Returns
the information associated to 'ns' in the table. If ns is in the table, found becomes true If not found becomes false and the returned value is the non-determined value of type T.

Definition at line 262 of file GraphNodeSetTable.hh.

References Diades::Graph::GraphNodeSet::begin(), Diades::Graph::GraphNodeSet::end(), Diades::Graph::NodeElement< T >::getChild(), Diades::Graph::NodeElement< T >::getInfo(), Diades::Graph::GraphNodeSet::isEmpty(), and Diades::Graph::NodeElement< T >::isTagged().

◆ getInfo() [2/2]

template<typename T >
T& Diades::Graph::GraphNodeSetTable< T >::getInfo ( const GraphNodeSet ns,
bool &  found 
)
inline
Parameters
nsa GraphNodeSet
founda Boolean that indicates if 'ns' is present or not
Returns
the information associated to 'ns' in the table. If ns is in the table, found becomes true If not found becomes false and the returned value is a non-determined value of type T.

Definition at line 292 of file GraphNodeSetTable.hh.

References Diades::Graph::GraphNodeSet::begin(), Diades::Graph::GraphNodeSet::end(), Diades::Graph::NodeElement< T >::getChild(), Diades::Graph::NodeElement< T >::getInfo(), Diades::Graph::GraphNodeSet::isEmpty(), and Diades::Graph::NodeElement< T >::isTagged().

◆ insertIfNotFound()

template<typename T >
T& Diades::Graph::GraphNodeSetTable< T >::insertIfNotFound ( const GraphNodeSet ns,
const T &  info,
bool &  found 
)
inline

Insertion

Parameters
nsa GraphNodeSet
infoan Information
founda Boolean that indicates if 'ns' is present or not
Returns
the information associated to 'ns' in the table. If ns is in the table, found becomes true the returned information is the one in the table and NOT 'info'. If not found becomes false and the returned value is a copy of 'info' stored in the tree.

Definition at line 324 of file GraphNodeSetTable.hh.

References Diades::Graph::GraphNodeSet::begin(), Diades::Graph::GraphNodeSet::end(), Diades::Graph::NodeElement< T >::getInfo(), Diades::Graph::NodeElement< T >::insertChildIfNotFound(), Diades::Graph::GraphNodeSet::isEmpty(), Diades::Graph::NodeElement< T >::isTagged(), and Diades::Graph::NodeElement< T >::setInfo().

◆ typeName()

template<typename T >
static string Diades::Graph::GraphNodeSetTable< T >::typeName ( )
inlinestatic

Definition at line 232 of file GraphNodeSetTable.hh.

Member Data Documentation

◆ _defaultInfo

template<typename T >
T Diades::Graph::GraphNodeSetTable< T >::_defaultInfo
private

root of the tree, if it is tagged then it encodes the presence of the empty set

Definition at line 240 of file GraphNodeSetTable.hh.

◆ _root

template<typename T >
NdElement Diades::Graph::GraphNodeSetTable< T >::_root
private

Definition at line 239 of file GraphNodeSetTable.hh.


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