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

#include <UnfoldingStateTable.hh>

Public Member Functions

 UnfoldingStateTable ()
 roots of the tree More...
 
getInfo (const UnfoldingState &s, bool &found) const
 
insertIfNotFound (const UnfoldingState &s, const T &info, bool &found)
 
void printTable () const
 

Private Member Functions

void insertCube (int *cube, int index, int size, list< StateNode< T > *> &currentListNode, typename list< StateNode< T > * >::iterator &nodeIt, const T &info)
 

Private Attributes

list< StateNode< T > * > roots
 

Detailed Description

template<class T>
class Diades::Sdmdl::UnfoldingStateTable< T >

Definition at line 128 of file UnfoldingStateTable.hh.

Constructor & Destructor Documentation

◆ UnfoldingStateTable()

template<class T >
Diades::Sdmdl::UnfoldingStateTable< T >::UnfoldingStateTable ( )
inline

roots of the tree

Default constructor Make an empty table

Definition at line 139 of file UnfoldingStateTable.hh.

Member Function Documentation

◆ getInfo()

template<class T >
T Diades::Sdmdl::UnfoldingStateTable< T >::getInfo ( const UnfoldingState s,
bool &  found 
) const
Parameters
san UnfoldingState
founda Boolean that indicates if 's' is present or not
Returns
the information associated to 's' in the table. If s is in the table, found becomes true If not found becomes false and the returned value is the default value of type T.

Definition at line 187 of file UnfoldingStateTable.hh.

References Diades::Sdmdl::StateNode< T >::children(), Diades::Sdmdl::UnfoldingState::cube(), Diades::Sdmdl::UnfoldingState::cubeSize(), Diades::Sdmdl::StateNode< T >::getInfo(), Diades::Sdmdl::StateNode< T >::isTagged(), require, Diades::Sdmdl::StateNode< T >::state(), and Diades::Sdmdl::UnfoldingState::valid().

◆ insertCube()

template<class T >
void Diades::Sdmdl::UnfoldingStateTable< T >::insertCube ( int *  cube,
int  index,
int  size,
list< StateNode< T > *> &  currentListNode,
typename list< StateNode< T > * >::iterator &  nodeIt,
const T &  info 
)
private
Parameters
cubea Cube (see Cudd library)
indexIndex of the first cube value to insert
sizeSize of the cube
currentListNodelist of StateNode
nodeItan iterator on the currentListNode
infoan Information to associate with bs

This method is used when the table does not contain 's' and insert it.

Definition at line 314 of file UnfoldingStateTable.hh.

References assertion, and Diades::Sdmdl::StateNode< T >::children().

◆ insertIfNotFound()

template<class T >
T Diades::Sdmdl::UnfoldingStateTable< T >::insertIfNotFound ( const UnfoldingState s,
const T &  info,
bool &  found 
)

Insertion

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

Definition at line 244 of file UnfoldingStateTable.hh.

References assertion, Diades::Sdmdl::StateNode< T >::children(), Diades::Sdmdl::UnfoldingState::cube(), Diades::Sdmdl::UnfoldingState::cubeSize(), Diades::Sdmdl::StateNode< T >::getInfo(), Diades::Sdmdl::StateNode< T >::isTagged(), require, Diades::Sdmdl::StateNode< T >::setInfo(), Diades::Sdmdl::StateNode< T >::state(), and Diades::Sdmdl::UnfoldingState::valid().

◆ printTable()

template<class T >
void Diades::Sdmdl::UnfoldingStateTable< T >::printTable ( ) const

print the table in the standard output

Definition at line 353 of file UnfoldingStateTable.hh.

References Diades::Sdmdl::StateNode< T >::children(), and Diades::Sdmdl::StateNode< T >::isTagged().

Member Data Documentation

◆ roots

template<class T >
list<StateNode<T> *> Diades::Sdmdl::UnfoldingStateTable< T >::roots
private

Definition at line 131 of file UnfoldingStateTable.hh.


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