mCRL2
Loading...
Searching...
No Matches
simple_structure_graph.h
Go to the documentation of this file.
1// Author(s): Wieger Wesselink
2// Copyright: see the accompanying file COPYING or copy at
3// https://github.com/mCRL2org/mCRL2/blob/master/COPYING
4//
5// Distributed under the Boost Software License, Version 1.0.
6// (See accompanying file LICENSE_1_0.txt or copy at
7// http://www.boost.org/LICENSE_1_0.txt)
8//
11
12#ifndef MCRL2_PBES_SIMPLE_STRUCTURE_GRAPH_H
13#define MCRL2_PBES_SIMPLE_STRUCTURE_GRAPH_H
14
17
18namespace mcrl2 {
19
20namespace pbes_system {
21
22// A structure graph
24{
25 public:
29
30 protected:
32
33 public:
36 {}
37
39 {
40 return find_vertex(u).decoration;
41 }
42
43 std::size_t extent() const
44 {
45 return m_vertices.size();
46 }
47
48 std::size_t rank(index_type u) const
49 {
50 return find_vertex(u).rank;
51 }
52
54 {
55 return m_vertices;
56 }
57
59 {
60 return m_vertices;
61 }
62
63 const std::vector<index_type>& predecessors(index_type u) const
64 {
65 return find_vertex(u).predecessors;
66 }
67
68 const std::vector<index_type>& successors(index_type u) const
69 {
70 return find_vertex(u).successors;
71 }
72
74 {
75 return find_vertex(u).strategy;
76 }
77
79 {
80 return m_vertices[u];
81 }
82
84 {
85 return m_vertices[u];
86 }
87
88 bool contains(index_type /* u */) const
89 {
90 return true;
91 }
92
93 bool is_empty() const
94 {
95 return m_vertices.empty();
96 }
97
98 std::size_t size() const
99 {
100 return m_vertices.size();
101 }
102};
103
104inline
105std::ostream& operator<<(std::ostream& out, const simple_structure_graph& G)
106{
107 return print_structure_graph(out, G);
108}
109
110} // namespace pbes_system
111
112} // namespace mcrl2
113
114#endif // MCRL2_PBES_SIMPLE_STRUCTURE_GRAPH_H
std::size_t size() const
Definition vector.h:329
const std::vector< index_type > & successors(index_type u) const
structure_graph::decoration_type decoration_type
decoration_type decoration(index_type u) const
const structure_graph::vertex_vector & all_vertices() const
const structure_graph::vertex_vector & m_vertices
const structure_graph::vertex_vector & vertices() const
simple_structure_graph(const structure_graph::vertex_vector &vertices)
const std::vector< index_type > & predecessors(index_type u) const
const vertex & find_vertex(index_type u) const
std::ostream & print_structure_graph(std::ostream &out, const StructureGraph &G)
std::ostream & operator<<(std::ostream &os, const absinthe_strategy strategy)
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
Definition indexed_set.h:72
add your file description here.