mCRL2
Loading...
Searching...
No Matches
stochastic_distribution.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_LPS_STOCHASTIC_DISTRIBUTION_H
13#define MCRL2_LPS_STOCHASTIC_DISTRIBUTION_H
14
15#include "mcrl2/data/variable.h"
16
17namespace mcrl2 {
18
19namespace lps {
20
21//--- start generated class stochastic_distribution ---//
24{
25 public:
28 : atermpp::aterm(core::detail::default_values::Distribution)
29 {}
30
34 : atermpp::aterm(term)
35 {
37 }
38
41 : atermpp::aterm(core::detail::function_symbol_Distribution(), variables, distribution)
42 {}
43
47 stochastic_distribution& operator=(const stochastic_distribution&) noexcept = default;
48 stochastic_distribution& operator=(stochastic_distribution&&) noexcept = default;
49
50 const data::variable_list& variables() const
51 {
52 return atermpp::down_cast<data::variable_list>((*this)[0]);
53 }
54
56 {
57 return atermpp::down_cast<data::data_expression>((*this)[1]);
58 }
59//--- start user section stochastic_distribution ---//
62 bool is_defined() const
63 {
64 return !variables().empty();
65 }
66//--- end user section stochastic_distribution ---//
67};
68
71template <class... ARGUMENTS>
72inline void make_stochastic_distribution(atermpp::aterm& t, const ARGUMENTS&... args)
73{
75}
76
79
81typedef std::vector<stochastic_distribution> stochastic_distribution_vector;
82
86inline
88{
90}
91
92// prototype declaration
93std::string pp(const stochastic_distribution& x);
94
99inline
100std::ostream& operator<<(std::ostream& out, const stochastic_distribution& x)
101{
102 return out << lps::pp(x);
103}
104
107{
108 t1.swap(t2);
109}
110//--- end generated class stochastic_distribution ---//
111
112} // namespace lps
113
114} // namespace mcrl2
115
116#endif // MCRL2_LPS_STOCHASTIC_DISTRIBUTION_H
aterm()
Default constructor.
Definition aterm.h:48
const function_symbol & function() const
Returns the function symbol belonging to an aterm.
Definition aterm.h:144
bool empty() const
Returns true if the list's size is 0.
Definition aterm_list.h:268
void swap(unprotected_aterm_core &t) noexcept
Swaps this term with its argument.
Definition aterm_core.h:152
\brief A stochastic distribution
stochastic_distribution(stochastic_distribution &&) noexcept=default
stochastic_distribution()
\brief Default constructor X3.
stochastic_distribution(const stochastic_distribution &) noexcept=default
Move semantics.
const data::variable_list & variables() const
bool is_defined() const
Returns true if the distribution is defined, i.e. it contains a valid distribution....
stochastic_distribution(const data::variable_list &variables, const data::data_expression &distribution)
\brief Constructor Z12.
stochastic_distribution(const atermpp::aterm &term)
const data::data_expression & distribution() const
The main namespace for the aterm++ library.
Definition algorithm.h:21
void make_term_appl(Term &target, const function_symbol &sym, ForwardIterator begin, ForwardIterator end)
Constructor an aterm in a variable based on a function symbol and an forward iterator providing the a...
Definition aterm.h:213
const atermpp::function_symbol & function_symbol_Distribution()
bool check_term_Distribution(const Term &t)
void make_stochastic_distribution(atermpp::aterm &t, const ARGUMENTS &... args)
std::string pp(const action_summand &x)
Definition lps.cpp:26
std::ostream & operator<<(std::ostream &out, const action_summand &x)
atermpp::term_list< stochastic_distribution > stochastic_distribution_list
\brief list of stochastic_distributions
void swap(action_summand &t1, action_summand &t2)
\brief swap overload
bool is_stochastic_distribution(const atermpp::aterm &x)
std::vector< stochastic_distribution > stochastic_distribution_vector
\brief vector of stochastic_distributions
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
Definition indexed_set.h:72
static const atermpp::function_symbol Distribution
The class variable.