mCRL2
Loading...
Searching...
No Matches
stochastic_action_summand.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_ACTION_SUMMAND_H
13#define MCRL2_LPS_STOCHASTIC_ACTION_SUMMAND_H
14
16
17namespace mcrl2 {
18
19namespace lps {
20
23{
24 protected:
27
28 public:
31 {}
32
37 {}
38
42 {}
43
47 stochastic_action_summand& operator=(const stochastic_action_summand&) noexcept = default;
48 stochastic_action_summand& operator=(stochastic_action_summand&&) noexcept = default;
49
52 {
53 return m_distribution;
54 }
55
58 {
59 return m_distribution;
60 }
61
64 {
66 using std::swap;
68 }
69};
70
71//--- start generated class stochastic_action_summand ---//
74
76typedef std::vector<stochastic_action_summand> stochastic_action_summand_vector;
77
78// prototype declaration
79std::string pp(const stochastic_action_summand& x);
80
85inline
86std::ostream& operator<<(std::ostream& out, const stochastic_action_summand& x)
87{
88 return out << lps::pp(x);
89}
90
93{
94 t1.swap(t2);
95}
96//--- end generated class stochastic_action_summand ---//
97
99inline
101{
102 if (x.distribution() == y.distribution())
103 {
104 return static_cast<const action_summand&>(x) < static_cast<const action_summand&>(y);
105 }
106 return x.distribution() < y.distribution();
107}
108
110inline
112{
113 return static_cast<const action_summand&>(x) == static_cast<const action_summand&>(y) && x.distribution() == y.distribution();
114}
115
117inline
119{
122 s.condition(),
123 s.multi_action(),
124 s.multi_action().time(),
125 s.assignments(),
126 s.distribution()
127 );
128 return result;
129}
130
131} // namespace lps
132
133} // namespace mcrl2
134
135#endif // MCRL2_LPS_STOCHASTIC_ACTION_SUMMAND_H
add your file description here.
LPS summand containing a multi-action.
void swap(action_summand &other)
Swaps the contents.
const lps::multi_action & multi_action() const
Returns the multi-action of this summand.
const data::assignment_list & assignments() const
Returns the sequence of assignments.
\brief A timed multi-action
const data::data_expression & time() const
LPS summand containing a multi-action.
stochastic_distribution m_distribution
The distribution of the summand.
stochastic_action_summand(stochastic_action_summand &&) noexcept=default
const stochastic_distribution & distribution() const
Returns the distribution of this summand.
void swap(stochastic_action_summand &other)
Swaps the contents.
stochastic_action_summand(const action_summand &s)
Constructor.
stochastic_action_summand(const data::variable_list &summation_variables, const data::data_expression &condition, const lps::multi_action &action, const data::assignment_list &assignments, const stochastic_distribution &distribution)
Constructor.
stochastic_action_summand(const stochastic_action_summand &) noexcept=default
Move semantics.
stochastic_distribution & distribution()
Returns the distribution of this summand.
\brief A stochastic distribution
const data::data_expression & condition() const
Returns the condition expression.
Definition summand.h:60
data::variable_list & summation_variables()
Returns the sequence of summation variables.
Definition summand.h:46
const atermpp::function_symbol & function_symbol_LinearProcessSummand()
std::vector< stochastic_action_summand > stochastic_action_summand_vector
\brief vector of stochastic_action_summands
std::string pp(const action_summand &x)
Definition lps.cpp:26
atermpp::term_list< stochastic_action_summand > stochastic_action_summand_list
\brief list of stochastic_action_summands
std::ostream & operator<<(std::ostream &out, const action_summand &x)
void swap(action_summand &t1, action_summand &t2)
\brief swap overload
bool operator==(const action_summand &x, const action_summand &y)
Equality operator of action summands.
bool operator<(const action_summand &x, const action_summand &y)
Comparison operator for action summands.
atermpp::aterm action_summand_to_aterm(const action_summand &s)
Conversion to aterm.
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
Definition indexed_set.h:72
void swap(atermpp::unprotected_aterm_core &t1, atermpp::unprotected_aterm_core &t2) noexcept
Swaps two aterms.
Definition aterm.h:462