DiaDes  0.1
DIAgnosis of Discrete-Event System
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Friends | List of all members
Diades::Graph::GraphNodeSet Class Reference

#include <GraphNodeSet.hh>

Public Types

using Node = Diades::Graph::Node
 
using Exception = Diades::Utils::Exception< GraphNodeSet >
 
using Iterator = set< Node >::const_iterator
 

Public Member Functions

 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
 

Static Public Member Functions

static string typeName ()
 

Protected Attributes

const Graph_grph
 
set< Node_nodes
 

Friends

ostream & operator<< (ostream &os, const GraphNodeSet &s)
 

Detailed Description

This class defines a set of Node objects in a Graph From a GraphNodeSet, a set of edges can be triggered and generate a new GraphNodeSet

Definition at line 30 of file GraphNodeSet.hh.

Member Typedef Documentation

◆ Exception

using Diades::Graph::GraphNodeSet::Exception = Diades::Utils::Exception<GraphNodeSet>

Definition at line 39 of file GraphNodeSet.hh.

◆ Iterator

using Diades::Graph::GraphNodeSet::Iterator = set<Node>::const_iterator

Iterator on the nodes

Definition at line 41 of file GraphNodeSet.hh.

◆ Node

using Diades::Graph::GraphNodeSet::Node = Diades::Graph::Node

Definition at line 33 of file GraphNodeSet.hh.

Constructor & Destructor Documentation

◆ GraphNodeSet() [1/5]

Diades::Graph::GraphNodeSet::GraphNodeSet ( const Graph graph)
inline

Default constructor, build an empty set

Parameters
graphGraph of the set

Definition at line 65 of file GraphNodeSet.hh.

◆ GraphNodeSet() [2/5]

Diades::Graph::GraphNodeSet::GraphNodeSet ( const Graph graph,
Node  n 
)

Parametrized constructor

Parameters
graphGraph of the node set
na Node
Precondition
s is a state of graph Build the node set { n }

◆ GraphNodeSet() [3/5]

Diades::Graph::GraphNodeSet::GraphNodeSet ( const Graph graph,
const set< Node > &  n 
)

Parametrized constructor

Parameters
graphGraph of the node set
na set of Node
Precondition
all states are state of grph Build the node set 'n'

◆ GraphNodeSet() [4/5]

Diades::Graph::GraphNodeSet::GraphNodeSet ( const Graph graph,
const unordered_set< Node > &  s 
)

Parametrized constructor

Parameters
graphGraph of the node set
sa set of Node
Precondition
all states are state of grph Build the node set 's'

◆ GraphNodeSet() [5/5]

Diades::Graph::GraphNodeSet::GraphNodeSet ( const GraphNodeSet ns)

Copy constructor

Member Function Documentation

◆ begin()

Iterator Diades::Graph::GraphNodeSet::begin ( ) const
inline

◆ end()

Iterator Diades::Graph::GraphNodeSet::end ( ) const
inline

◆ findNode()

Iterator Diades::Graph::GraphNodeSet::findNode ( Node  n) const
inline

Find a Node

Parameters
nNode to find in the GraphNodeSet
Returns
a GraphNodeSetIterator it
Postcondition
if n is in the GraphNodeSet then *it == n otherwise it == nodeEnd()

Definition at line 137 of file GraphNodeSet.hh.

References require.

Referenced by Diades::Automata::Experimental::BeliefState< StateMachine >::findState().

◆ graph()

const Graph& Diades::Graph::GraphNodeSet::graph ( ) const
inline

Graph

Returns
the Graph of the node set

Definition at line 187 of file GraphNodeSet.hh.

◆ insertNode()

void Diades::Graph::GraphNodeSet::insertNode ( Node  n)

Insertion of a state

Parameters
na Node
Precondition
n is a Node of graph()

Referenced by Diades::Automata::Experimental::BeliefState< StateMachine >::insertState().

◆ insertNodes()

template<class InputNodeIterator >
void Diades::Graph::GraphNodeSet::insertNodes ( InputNodeIterator  first,
InputNodeIterator  last 
)
inline

◆ isEmpty()

bool Diades::Graph::GraphNodeSet::isEmpty ( ) const
inline

Emptyness

Returns
true if the set is empty

Definition at line 149 of file GraphNodeSet.hh.

Referenced by Diades::Graph::GraphNodeSetTable< T >::getInfo(), and Diades::Graph::GraphNodeSetTable< T >::insertIfNotFound().

◆ nextGraphNodeSet()

GraphNodeSet* Diades::Graph::GraphNodeSet::nextGraphNodeSet ( const set< Edge > &  edges) const

Next node set

Parameters
edgesset of Edge objects
Returns
the node set obtained after triggering every every from edges that are triggerable in the current node set

◆ operator==()

bool Diades::Graph::GraphNodeSet::operator== ( const GraphNodeSet ns) const
inline
Parameters
nsa GraphNodeSet
Returns
true if the current GraphNodeSet has the same content than ns

Definition at line 223 of file GraphNodeSet.hh.

References _grph, _nodes, and Diades::Utils::operator<<().

Referenced by Diades::Automata::BeliefState::operator==().

◆ previousGraphNodeSet()

GraphNodeSet* Diades::Graph::GraphNodeSet::previousGraphNodeSet ( const set< Edge > &  edges) const

Previous node set

Parameters
egdesset of Edge objects
Returns
the biggest previous node set NS such that from every node of NS, there is a node in the current GraphNodeSet that results from the triggerring of an Edge from edges

◆ removeNode()

void Diades::Graph::GraphNodeSet::removeNode ( Node  n)

Removal of a state

Parameters
na Node
Precondition
n is a Node of graph()

Referenced by Diades::Automata::Experimental::BeliefState< StateMachine >::removeState().

◆ setOfNodes()

set<Node>& Diades::Graph::GraphNodeSet::setOfNodes ( )
inline

set of _nodes

Returns
the set of nodes of the GraphNodeSet

Definition at line 214 of file GraphNodeSet.hh.

◆ size()

int Diades::Graph::GraphNodeSet::size ( ) const
inline

Size of the set

Definition at line 158 of file GraphNodeSet.hh.

◆ typeName()

static string Diades::Graph::GraphNodeSet::typeName ( )
inlinestatic

Definition at line 35 of file GraphNodeSet.hh.

Friends And Related Function Documentation

◆ operator<<

ostream& operator<< ( ostream &  os,
const GraphNodeSet s 
)
friend

output stream

Member Data Documentation

◆ _grph

const Graph& Diades::Graph::GraphNodeSet::_grph
protected

Definition at line 44 of file GraphNodeSet.hh.

Referenced by Diades::Automata::BeliefState::operator=(), and operator==().

◆ _nodes

set<Node> Diades::Graph::GraphNodeSet::_nodes
protected

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