DiaDes
0.1
DIAgnosis of Discrete-Event System
|
#include <GraphData.hh>
Public Member Functions | |
vector< Edge > & | vEdges () |
vector< Node > & | vNodes () |
list< SizeType > & | listEdgeId () |
list< SizeType > & | listNodeId () |
const vector< Edge > & | vEdges () const |
const vector< Node > & | vNodes () const |
const list< SizeType > & | listEdgeId () const |
const list< SizeType > & | listNodeId () const |
unsigned | id () const |
GraphData () | |
virtual | ~GraphData () |
bool | sanityCheck (string &log) const |
Accessors | |
SizeType | numberOfNodes () const |
SizeType | numberOfEdges () const |
bool | empty () const |
const Node & | target (const Edge &edge) const |
const Node & | source (const Edge &edge) const |
bool | cycleDetection (const Node &n) const |
Construction of the graph | |
const Node & | newNode () |
const Node & | newNode (SizeType index) |
Node | getNode (SizeType index) const |
Edge | getEdge (SizeType index) const |
const Edge & | newEdge (Node source, Node target) |
const Edge & | newEdge (SizeType index, Node source, Node target) |
Deletion | |
virtual void | deleteNode (Node &node) |
virtual void | deleteNode (NodeIterator start, NodeIterator end) |
virtual void | deleteEdge (Edge &edge) |
virtual void | deleteEdge (EdgeIterator start, EdgeIterator end) |
virtual void | deleteEdge (LocalEdgeIterator start, LocalEdgeIterator end) |
virtual void | deleteAllEdges () |
void | clear () |
Iterators | |
NodeIterator | nodeBegin () |
NodeIterator | nodeEnd () |
NodeIterator | nodeBegin () const |
NodeIterator | nodeEnd () const |
EdgeIterator | edgeBegin () |
EdgeIterator | edgeEnd () |
EdgeIterator | edgeBegin () const |
EdgeIterator | edgeEnd () const |
OutEdgeIterator | outEdgeBegin (const Node &node) const |
OutEdgeIterator | outEdgeEnd (const Node &node) const |
InEdgeIterator | inEdgeBegin (const Node &node) const |
InEdgeIterator | inEdgeEnd (const Node &node) const |
GraphData & | operator= (const GraphData &) |
SizeType | edgeCapacity () const |
SizeType | nodeCapacity () const |
Private Attributes | |
vector< Edge > | _vEdges |
vector< Node > | _vNodes |
list< SizeType > | _listEdgeId |
list< SizeType > | _listNodeId |
SizeType | _nbNodes |
SizeType | _nbEdges |
unsigned | _id |
Friends | |
class | Graph |
Definition at line 134 of file GraphData.hh.
Diades::Graph::GraphData::GraphData | ( | ) |
Default constructor
Make an empty graph
|
virtual |
Destructor
Desallocate all the memory resource used by its states and transitions. Destructor
void Diades::Graph::GraphData::clear | ( | ) |
Elimination of edge paths
s | a Node |
Elimination of transition paths from the state s in the current graph. Make the graph empty
Desallocate all the memory resource used by its nodes and edges.
Referenced by Diades::Graph::Graph::clear(), and Diades::Graph::Graph::init().
bool Diades::Graph::GraphData::cycleDetection | ( | const Node & | n | ) | const |
Cycle detection
n | a Node |
Referenced by Diades::Graph::Graph::cycleDetection().
|
virtual |
Deletion of all the edges
Referenced by Diades::Graph::Graph::deleteAllEdges().
|
virtual |
Deletion of an Edge
edge | Edge to delete |
Deletion of the Edge egde (desallocation of memory).
Referenced by Diades::Graph::Graph::deleteEdge(), and Diades::Graph::deleteEdge().
|
virtual |
Deletion of edges
start | EdgeIterator |
end | EdgeIterator |
Deletion of the edges in [start,end) (desallocation of memory).
|
virtual |
|
virtual |
Deletion of a Node
node | Node to delete |
Deletion of the Node node. All the input and output edges of 'nodes' are deleted. (desallocation of memory)
Referenced by Diades::Graph::Graph::deleteNode(), and Diades::Graph::deleteNode().
|
virtual |
Deletion of nodes
start | GraphIterator |
end | GraphIterator |
Deletion of the nodes in [start,end). All the input and output edges are deleted. (desallocation of memory)
|
inline |
Iterator for the transitions in the graph
Definition at line 432 of file GraphData.hh.
|
inline |
Iterator for the transitions in the graph
Definition at line 453 of file GraphData.hh.
|
inline |
Size of a graph
transitions | to measure |
Definition at line 539 of file GraphData.hh.
Referenced by Diades::Graph::Graph::edgeCapacity().
|
inline |
Past-the-end iterator for the transitions of the graph.
Definition at line 442 of file GraphData.hh.
|
inline |
Past-the-end iterator for the transitions of the graph.
Definition at line 463 of file GraphData.hh.
|
inline |
Return true if the graph is empty
Definition at line 211 of file GraphData.hh.
References numberOfNodes().
|
inline |
Definition at line 155 of file GraphData.hh.
References _id.
Referenced by Diades::Graph::Graph::id().
InEdgeIterator Diades::Graph::GraphData::inEdgeBegin | ( | const Node & | node | ) | const |
Iterator on Edges
node | : a Node |
InEdgeIterator Diades::Graph::GraphData::inEdgeEnd | ( | const Node & | node | ) | const |
Iterator on Edges
node | : a Node |
|
inline |
Definition at line 149 of file GraphData.hh.
References _listEdgeId.
Referenced by boost::serialization::load().
|
inline |
Definition at line 153 of file GraphData.hh.
References _listEdgeId.
|
inline |
Definition at line 150 of file GraphData.hh.
References _listNodeId.
Referenced by boost::serialization::load().
|
inline |
Definition at line 154 of file GraphData.hh.
References _listNodeId.
Creation of a new edge
Referenced by boost::serialization::load(), and Diades::Graph::Graph::newEdge().
const Node& Diades::Graph::GraphData::newNode | ( | ) |
Creation of a new node
reference | to the GraphData |
Referenced by boost::serialization::load(), and Diades::Graph::Graph::newNode().
|
inline |
Iterator for the nodes in the graph
Definition at line 390 of file GraphData.hh.
|
inline |
Iterator for the nodes in the graph
Definition at line 410 of file GraphData.hh.
|
inline |
Definition at line 545 of file GraphData.hh.
Referenced by Diades::Graph::Graph::nodeCapacity().
|
inline |
Past-the-end iterator for the nodes of the graph.
Definition at line 399 of file GraphData.hh.
|
inline |
Past-the-end iterator for the nodes of the graph.
Definition at line 419 of file GraphData.hh.
|
inline |
Return the number of transitions in the graph
Definition at line 201 of file GraphData.hh.
References _nbEdges.
Referenced by Diades::Graph::Graph::numberOfEdges().
|
inline |
Return the number of states in the graph.
Definition at line 191 of file GraphData.hh.
References _nbNodes.
Referenced by empty(), and Diades::Graph::Graph::numberOfNodes().
OutEdgeIterator Diades::Graph::GraphData::outEdgeBegin | ( | const Node & | node | ) | const |
Iterator on Edges
node | : a Node |
OutEdgeIterator Diades::Graph::GraphData::outEdgeEnd | ( | const Node & | node | ) | const |
Iterator on Edges
node | : a Node |
bool Diades::Graph::GraphData::sanityCheck | ( | string & | log | ) | const |
Referenced by Diades::Graph::Graph::sanityCheck().
Source state of an Edge
edge | an Edge |
Definition at line 675 of file GraphInt.hh.
References Diades::Graph::Edge::_eData, Diades::Graph::EdgeData::_source, _vNodes, Diades::Graph::Graph::data(), Diades::Graph::NodeData::identifier(), Diades::Graph::Edge::owner(), require, and Diades::Graph::Edge::valid().
Referenced by Diades::Graph::Edge::source(), and Diades::Graph::Graph::source().
edge | an Edge |
Definition at line 668 of file GraphInt.hh.
References Diades::Graph::Edge::_eData, Diades::Graph::EdgeData::_target, _vNodes, Diades::Graph::Graph::data(), Diades::Graph::NodeData::identifier(), Diades::Graph::Edge::owner(), require, and Diades::Graph::Edge::valid().
Referenced by Diades::Graph::Edge::target(), and Diades::Graph::Graph::target().
|
inline |
Definition at line 147 of file GraphData.hh.
References _vEdges.
Referenced by boost::serialization::load().
|
inline |
Definition at line 151 of file GraphData.hh.
References _vEdges.
|
inline |
Definition at line 148 of file GraphData.hh.
References _vNodes.
Referenced by boost::serialization::load().
|
inline |
Definition at line 152 of file GraphData.hh.
References _vNodes.
|
friend |
Definition at line 554 of file GraphData.hh.
|
private |
Definition at line 144 of file GraphData.hh.
Referenced by id().
|
private |
Definition at line 140 of file GraphData.hh.
Referenced by listEdgeId().
|
private |
Definition at line 141 of file GraphData.hh.
Referenced by listNodeId().
|
private |
Definition at line 143 of file GraphData.hh.
Referenced by numberOfEdges().
|
private |
Definition at line 142 of file GraphData.hh.
Referenced by numberOfNodes().
|
mutableprivate |
Definition at line 138 of file GraphData.hh.
Referenced by Diades::Graph::Graph::edgeBegin(), Diades::Graph::Graph::edgeEnd(), and vEdges().
|
mutableprivate |
Definition at line 139 of file GraphData.hh.
Referenced by Diades::Graph::Graph::nodeBegin(), Diades::Graph::Graph::nodeEnd(), source(), target(), and vNodes().