mCRL2
Loading...
Searching...
No Matches
find.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_DATA_DETAIL_FIND_H
13#define MCRL2_DATA_DETAIL_FIND_H
14
15#include "mcrl2/data/variable.h"
16
17namespace mcrl2 {
18
19namespace data {
20
21namespace detail {
22
25inline
26std::set<core::identifier_string> variable_names(const std::set<data::variable>& variables)
27{
28 std::set<core::identifier_string> result;
29 for (const data::variable& v: variables)
30 {
31 result.insert(v.name());
32 }
33 return result;
34}
35
38inline
39std::set<std::string> variable_name_strings(const std::set<data::variable>& variables)
40{
41 std::set<std::string> result;
42 for (const data::variable& v: variables)
43 {
44 result.insert(std::string(v.name()));
45 }
46 return result;
47}
48
51inline
52std::set<std::string> variable_name_strings(const std::set<data::variable>& variables1, const std::set<data::variable>& variables2)
53{
54 std::set<std::string> result;
55 for (const data::variable& v: variables1)
56 {
57 result.insert(std::string(v.name()));
58 }
59 for (const data::variable& v: variables2)
60 {
61 result.insert(std::string(v.name()));
62 }
63 return result;
64}
65
66} // namespace detail
67
68} // namespace data
69
70} // namespace mcrl2
71
72#endif // MCRL2_DATA_DETAIL_FIND_H
\brief A data variable
Definition variable.h:28
std::set< std::string > variable_name_strings(const std::set< data::variable > &variables)
Returns the names of a set of data variables as a set of strings.
Definition find.h:39
std::set< core::identifier_string > variable_names(const std::set< data::variable > &variables)
Returns the names of a set of data variables.
Definition find.h:26
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
Definition indexed_set.h:72
The class variable.