DiaDes
0.1
DIAgnosis of Discrete-Event System
|
#include <EventSet.hh>
Public Types | |
typedef size_t | EventCode |
EventCode the code of an Event in the EventSetManager. More... | |
typedef std::unordered_map< EventId, size_t > | Map |
Map data structure that contains the encoding of the involved Events. More... | |
typedef boost::dynamic_bitset | EventSet |
EventSet a simple dynamic bitset represents a set of Events. More... | |
typedef Diades::Utils::Exception< EventSetManager > | Exception |
Public Member Functions | |
EventSetManager () | |
EventSetManager (const EventSetManager &mgr) | |
EventSetManager (EventSetManager &&mgr) | |
EventSetManager & | operator= (const EventSetManager &mgr) |
~EventSetManager () | |
const Map & | map () const |
bool | hasEvent (EventId e) const |
bool | hasCode (EventCode c) const |
template<typename EventIterator > | |
EventSetManager & | initialise (EventIterator first, EventIterator last) |
template<typename EventIterator > | |
EventSetManager & | encodeRange (EventIterator first, EventIterator last) |
EventCode | encode (EventId e) |
EventCode | encodeNoCheck (EventId e) |
EventCode | code (EventId e) const |
EventId | event (EventCode c) const |
size_t | numberOfEncodedEvents () const |
template<typename EventIterator > | |
EventSet | eventSet (EventIterator first, EventIterator last) const |
std::vector< EventId > | decodeEventSet (const EventSet &eventSet) const |
EventSet | projectEventSet (const EventSetManager &mgr, const EventSet &es) |
EventSet | eventSet (EventId e) const |
EventSet | emptySet () const |
bool | contains (const EventSet &eSet, EventId e) const |
EventSetManager & | sortCodes () |
Static Public Member Functions | |
static string | typeName () |
mapping Id->Event More... | |
Private Attributes | |
Map | _idOfEvent |
std::unordered_map< size_t, EventId > | _eventOfId |
mapping Event->Id More... | |
This class implements Event enconding to define EventSet. Indeed, an EventSet can be interpreted as a set of Event only with the help of an EventSetManager. Note that for efficiency purpose, an EventSet is not directly associated with its EventSetManager. It is the responsability of the user to manage this assoaciation if it is necessery to do so.
Definition at line 90 of file EventSet.hh.
typedef size_t Diades::Automata::Experimental::EventSetManager< EventLabel, EventId >::EventCode |
EventCode the code of an Event in the EventSetManager.
Definition at line 95 of file EventSet.hh.
typedef boost::dynamic_bitset Diades::Automata::Experimental::EventSetManager< EventLabel, EventId >::EventSet |
EventSet a simple dynamic bitset represents a set of Events.
Definition at line 100 of file EventSet.hh.
typedef Diades::Utils::Exception<EventSetManager> Diades::Automata::Experimental::EventSetManager< EventLabel, EventId >::Exception |
Definition at line 112 of file EventSet.hh.
typedef std::unordered_map<EventId, size_t> Diades::Automata::Experimental::EventSetManager< EventLabel, EventId >::Map |
Map data structure that contains the encoding of the involved Events.
Definition at line 97 of file EventSet.hh.
|
inline |
Default constructor: empty set of Events
Definition at line 119 of file EventSet.hh.
|
inline |
Copy constructor
Definition at line 126 of file EventSet.hh.
|
inline |
Move constructor
Definition at line 134 of file EventSet.hh.
|
inline |
Destructor
Definition at line 155 of file EventSet.hh.
|
inline |
e | an Event |
Definition at line 260 of file EventSet.hh.
|
inline |
eSet | an EventSet |
e | an Event |
Definition at line 403 of file EventSet.hh.
|
inline |
decode an eventSet with his manager
eventSet | the eventSet to decode |
Definition at line 319 of file EventSet.hh.
Referenced by printSolution().
|
inline |
Definition at line 389 of file EventSet.hh.
|
inline |
e | an Event |
Definition at line 232 of file EventSet.hh.
|
inline |
e | an Event |
Definition at line 247 of file EventSet.hh.
|
inline |
encoding the Event Range and append to the rest (unsorted, first in, first encoded, doublons are checked, one Event = one code)
Definition at line 212 of file EventSet.hh.
|
inline |
c | an EventCode |
Definition at line 273 of file EventSet.hh.
Referenced by Diades::Automata::Experimental::EventSetManagerPrettyPrinter< EventInfo, EventId >::print(), and Diades::Automata::Experimental::EventSetManager< EventInfo, EventId >::projectEventSet().
|
inline |
Definition at line 299 of file EventSet.hh.
|
inline |
e | Event |
Definition at line 373 of file EventSet.hh.
|
inline |
c | an EventCode |
Definition at line 180 of file EventSet.hh.
|
inline |
e | an Event |
Definition at line 171 of file EventSet.hh.
|
inline |
Initialise an encoding for the Event Range (unsorted, first in, first encoded)
Definition at line 194 of file EventSet.hh.
|
inline |
Definition at line 162 of file EventSet.hh.
|
inline |
Definition at line 284 of file EventSet.hh.
|
inline |
Assignment operator
Definition at line 142 of file EventSet.hh.
|
inline |
mgr | an EventSetManager |
es | an EventSet encoded in mgr |
Definition at line 346 of file EventSet.hh.
|
inline |
This method sorts the encoding of the events so that enc(e1) end(e2) iff e1 e2. This is a way to ensure that for a given set of events the encoding is unique. Note that the encoding functions do not sort the encoding. This method should be explicity called once the set of events is encoded and before any creation of an EventSet.
Definition at line 422 of file EventSet.hh.
|
inlinestatic |
mapping Id->Event
Definition at line 108 of file EventSet.hh.
|
private |
mapping Event->Id
Definition at line 104 of file EventSet.hh.
Referenced by Diades::Automata::Experimental::EventSetManager< EventInfo, EventId >::operator=().
|
private |
Definition at line 103 of file EventSet.hh.
Referenced by Diades::Automata::Experimental::EventSetManager< EventInfo, EventId >::operator=().