DiaDes  0.1
DIAgnosis of Discrete-Event System
Public Member Functions | Private Attributes | List of all members
Diades::Petri::ZslFactory Class Reference

#include <Zsl.hh>

Public Member Functions

 ZslFactory (const Net &net)
 
virtual ~ZslFactory ()
 
const ZslgetZsl (Place place, int value, const Zsl *zsl)
 
const ZslgetZsl (unsigned id)
 
string printZsl (const Zsl *zsl) const
 
const Netowner () const
 
const ZsladdZsl (const Zsl *zsl, Place p, int value)
 
void printDot (const string &fileName) const
 
void printTable ()
 

Private Attributes

const Net_net
 
vector< vector< unordered_map< unsigned, Zsl * > > > _negTable
 
vector< vector< unordered_map< unsigned, Zsl * > > > _posTable
 
vector< Zsl * > _table
 

Detailed Description

Definition at line 137 of file Zsl.hh.

Constructor & Destructor Documentation

◆ ZslFactory()

Diades::Petri::ZslFactory::ZslFactory ( const Net net)
inline

Create a ZslFactory associated to a Petri Net

Parameters
netthe associated Net

Definition at line 151 of file Zsl.hh.

◆ ~ZslFactory()

virtual Diades::Petri::ZslFactory::~ZslFactory ( )
virtual

Destructor

Member Function Documentation

◆ addZsl()

const Zsl* Diades::Petri::ZslFactory::addZsl ( const Zsl zsl,
Place  p,
int  value 
)
Parameters
zsla Zsl
pa Place
valuea value
Returns
a Zsl that results from the appending of a cell (p,value) to the Zsl zsl
Postcondition
the appending is smart, so does not appendi if value is 0
See also
the function ADD of molinaro.pdf

◆ getZsl() [1/2]

const Zsl* Diades::Petri::ZslFactory::getZsl ( Place  place,
int  value,
const Zsl zsl 
)

This method implements the find_or_add algorithm of Molinaro

Parameters
placea Place of net()
valuea value
zsla Zsl or 0
Returns
the Zsl(place,value,zsl)
Postcondition
if not in the factory, the Zsl is created, guarantee that the Zsl has a unique representative in the Factory

◆ getZsl() [2/2]

const Zsl* Diades::Petri::ZslFactory::getZsl ( unsigned  id)
inline
Parameters
ida identifier
Returns
the zsl associated with this id, if not exist return 0

Definition at line 178 of file Zsl.hh.

◆ owner()

const Net* Diades::Petri::ZslFactory::owner ( ) const
inline
Returns
the Net associated with the ZslFactory

Definition at line 205 of file Zsl.hh.

References Diades::Graph::printDot().

◆ printDot()

void Diades::Petri::ZslFactory::printDot ( const string &  fileName) const

Export a dot output of the factory for debugging

Parameters
fileNamethe name of the output file

◆ printTable()

void Diades::Petri::ZslFactory::printTable ( )

◆ printZsl()

string Diades::Petri::ZslFactory::printZsl ( const Zsl zsl) const
inline
Parameters
zsl
Returns
a string that contains the zsl

Definition at line 185 of file Zsl.hh.

References Diades::Petri::Zsl::next(), Diades::Petri::Zsl::place(), and Diades::Petri::Zsl::value().

Member Data Documentation

◆ _negTable

vector< vector< unordered_map<unsigned, Zsl *> > > Diades::Petri::ZslFactory::_negTable
private

Definition at line 142 of file Zsl.hh.

◆ _net

const Net* Diades::Petri::ZslFactory::_net
private

Definition at line 141 of file Zsl.hh.

◆ _posTable

vector< vector< unordered_map<unsigned, Zsl *> > > Diades::Petri::ZslFactory::_posTable
private

Definition at line 143 of file Zsl.hh.

◆ _table

vector<Zsl *> Diades::Petri::ZslFactory::_table
private

Definition at line 144 of file Zsl.hh.


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