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

#include <BeliefState.hh>

Public Member Functions

 BeliefState (const Component &comp)
 
 BeliefState (const Component &comp, State s)
 
 BeliefState (const Component &comp, const set< State > &s)
 
 BeliefState (const Component &comp, const unordered_set< State > &s)
 
 BeliefState (const BeliefState &bs)
 
BeliefStateoperator= (const BeliefState &bs)
 
BeliefStatenextBeliefState (Event e) const
 
BeliefStatenextBeliefState (Event e, const set< Event > &ignored) const
 
BeliefStatepreviousBeliefState (Event e) const
 
bool operator== (const BeliefState &bs) const
 
const Componentcomponent () const
 
- Public Member Functions inherited from Diades::Graph::GraphNodeSet
 GraphNodeSet (const Graph &graph)
 
 GraphNodeSet (const Graph &graph, Node n)
 
 GraphNodeSet (const Graph &graph, const set< Node > &n)
 
 GraphNodeSet (const Graph &graph, const unordered_set< Node > &s)
 
 GraphNodeSet (const GraphNodeSet &ns)
 
void insertNode (Node n)
 
template<class InputNodeIterator >
void insertNodes (InputNodeIterator first, InputNodeIterator last)
 
void removeNode (Node n)
 
Iterator findNode (Node n) const
 
bool isEmpty () const
 
int size () const
 
GraphNodeSetnextGraphNodeSet (const set< Edge > &edges) const
 
GraphNodeSetpreviousGraphNodeSet (const set< Edge > &edges) const
 
const Graphgraph () const
 
Iterator begin () const
 
Iterator end () const
 
set< Node > & setOfNodes ()
 
bool operator== (const GraphNodeSet &ns) const
 

Private Attributes

const Component_comp
 

Additional Inherited Members

- Public Types inherited from Diades::Graph::GraphNodeSet
using Node = Diades::Graph::Node
 
using Exception = Diades::Utils::Exception< GraphNodeSet >
 
using Iterator = set< Node >::const_iterator
 
- Static Public Member Functions inherited from Diades::Graph::GraphNodeSet
static string typeName ()
 
- Protected Attributes inherited from Diades::Graph::GraphNodeSet
const Graph_grph
 
set< Node_nodes
 

Detailed Description

This class defines a belief state of a Component From a belief state a transition can be triggered and generate a new BeliefState

Definition at line 53 of file BeliefState.hh.

Constructor & Destructor Documentation

◆ BeliefState() [1/5]

Diades::Automata::BeliefState::BeliefState ( const Component comp)

Default constructor, build an empty belief state

Parameters
compComponent of the belief state

◆ BeliefState() [2/5]

Diades::Automata::BeliefState::BeliefState ( const Component comp,
State  s 
)

Parametrized constructor

Parameters
compComponent of the belief state
sa State
Precondition
s is a state of comp Build the belief state { s }

◆ BeliefState() [3/5]

Diades::Automata::BeliefState::BeliefState ( const Component comp,
const set< State > &  s 
)

Parametrized constructor

Parameters
compComponent of the belief state
sa set of State
Precondition
s is a set of states from Tsys Build the belief state s

◆ BeliefState() [4/5]

Diades::Automata::BeliefState::BeliefState ( const Component comp,
const unordered_set< State > &  s 
)

Parametrized constructor

Parameters
compComponent of the belief state
sa set of State
Precondition
s is a set of states from Tsys Build the belief state s

◆ BeliefState() [5/5]

Diades::Automata::BeliefState::BeliefState ( const BeliefState bs)

Copy constructor

Member Function Documentation

◆ component()

const Component& Diades::Automata::BeliefState::component ( ) const
inline

Transition System

Returns
the transition system of the belief state

Definition at line 166 of file BeliefState.hh.

◆ nextBeliefState() [1/2]

BeliefState* Diades::Automata::BeliefState::nextBeliefState ( Event  e) const

Next belief state

Parameters
eEvent to trigger
Returns
the belief state obtained after triggering the event e from the current belief state in the Component

◆ nextBeliefState() [2/2]

BeliefState* Diades::Automata::BeliefState::nextBeliefState ( Event  e,
const set< Event > &  ignored 
) const

Next belief state

Parameters
eEvent to trigger
Returns
the belief state obtained after triggering the event e from the current belief state in the Component. The events from 'ignored' are ignored, i.e. if, from a state s of the current belief state there is a sequence of events e1->...->en->e that reaches a state s' and every event ei belongs to 'ignored' then s' belongs to the returned BeleifState. from the current belief state in the Component
Precondition
c does not belong to 'ignored'

◆ operator=()

BeliefState& Diades::Automata::BeliefState::operator= ( const BeliefState bs)
inline

Assignation

Definition at line 104 of file BeliefState.hh.

References _comp, Diades::Graph::GraphNodeSet::_grph, Diades::Graph::GraphNodeSet::_nodes, and require.

◆ operator==()

bool Diades::Automata::BeliefState::operator== ( const BeliefState bs) const
inline
Parameters
bsa BeliefState
Returns
true if the current BeliefState has the same content than bs

Definition at line 155 of file BeliefState.hh.

References _comp, and Diades::Graph::GraphNodeSet::operator==().

◆ previousBeliefState()

BeliefState* Diades::Automata::BeliefState::previousBeliefState ( Event  e) const

Previous belief state

Parameters
eEvent to trigger
Returns
the biggest previous belief state Bprev such that from every state of Bprev, there is a state in the current BeliefState that results from the trigger of e

Member Data Documentation

◆ _comp

const Component& Diades::Automata::BeliefState::_comp
private

Definition at line 58 of file BeliefState.hh.

Referenced by operator=(), and operator==().


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