(Event+Time).Variant Operators  2.3
Operators for Timed Discrete Event Systems in Dioids
E_op.h
1 #ifndef EOP_H
2 #define EOP_H
3 #include<vector>
4 #include<utility>
5 #include "gNg.h"
6 #include "../Fper/Fminp.h"
7 
8 
9 namespace etvo
10 {
20 class E_op
21 {
22 public:
24  static E_op E();
26  static E_op Mu(unsigned m);
28  static E_op Beta(unsigned b);
30  static E_op Nabla(unsigned m,unsigned b);
32  static E_op Nabla(unsigned mb);
33 
35  static E_op MuVar(const std::vector<unsigned> & weights);
37  static E_op BetaVar(const std::vector<unsigned> & weights);
39  static E_op Gamma(int n);
40 
41  public:
43  E_op();
45  E_op(const gNg & term);
46 
48  void add(const gNg & term);
50  void add(const E_op & op);
51 
53  std::pair<unsigned,unsigned> getPeriodicity() const;
54 
56  std::vector<gNg> getTerms() const;
57 
59  unsigned getM() const;
61  unsigned getB() const;
63  E_op extendBy(unsigned mul) const;
64 
66  void reduce();
67 
69  std::string toString() const;
71  std::string toStringAsMuVar() const;
72 
74  int Fw(int ki) const;
76  Fminp getFw() const;
78  void setFromFw(const Fminp &);
79 
81  E_op operator+(const E_op & f) const;
83  E_op oplus(const E_op & f) const;
84 
86  E_op operator*(const E_op & f) const;
88  E_op otimes(const E_op & f) const;
90  E_op inf(const E_op & f) const;
91 
93  E_op osum(const E_op & f) const;
94 
96  E_op lfrac(const E_op & f) const;
98  E_op rfrac(const E_op & f) const;
99 
100  bool operator==(const E_op & w) const;
101  bool operator!=(const E_op & w) const;
102  bool operator<=(const E_op & w) const;
103  bool operator>=(const E_op & w) const;
104  bool operator>(const E_op & w) const;
105  bool operator<(const E_op & w) const;
106 
107  protected:
108  Fminp _fper;
109 };
110 
111  std::ostream & operator<<(std::ostream & f, const E_op & m);
112 }
113 #endif // EOP_H
static E_op E()
neutral E_op
Definition: E_op.cpp:14
std::vector< gNg > getTerms() const
Returns the set of gNg terms for the current E-operator.
Definition: E_op.cpp:103
std::string toStringAsMuVar() const
Returns a string which describes the E-operator with a <seq> description.
Definition: E_op.cpp:155
static E_op BetaVar(const std::vector< unsigned > &weights)
E_op::BetaVar({1,2}) is an E-operator <seq> defined by a sequence of weights.
Definition: E_op.cpp:60
unsigned getM() const
Returns the M value in the (B,M) periodicity.
Definition: E_op.cpp:118
E_op otimes(const E_op &f) const
Product of E_op elements.
Definition: E_op.cpp:209
std::string toString() const
Returns a string which describes the E-operator.
Definition: E_op.cpp:143
static E_op Beta(unsigned b)
E_op::Beta(c) is the operator.
Definition: E_op.cpp:26
static E_op Mu(unsigned m)
E_op::Mu(c) is the operator.
Definition: E_op.cpp:21
E_op operator*(const E_op &f) const
Product of E_op elements.
Definition: E_op.cpp:203
static E_op MuVar(const std::vector< unsigned > &weights)
E_op::MuVar({1,2}) is an E-operator <seq> defined by a sequence of weights.
Definition: E_op.cpp:41
void setFromFw(const Fminp &)
Defines the current E-operator from a counter-to-counter function.
Definition: E_op.cpp:186
void add(const gNg &term)
Add a gNg term to the current E-operator.
Definition: E_op.cpp:88
std::ostream & operator<<(std::ostream &f, const dDd &m)
Definition: dDd.cpp:313
Definition: etvoException.cpp:5
E_op osum(const E_op &f) const
osum (classical sum) of E_op elements
Definition: E_op.cpp:221
E_op()
default initialization is the neutral E-operator
Definition: E_op.cpp:78
unsigned getB() const
Returns the B value in the (B,M) periodicity.
Definition: E_op.cpp:123
std::pair< unsigned, unsigned > getPeriodicity() const
Returns the periodicity of the Fw Counter-to-Counter function (B,M)
Definition: E_op.cpp:98
E_op operator+(const E_op &f) const
Sum of E_op elements.
Definition: E_op.cpp:191
Class to describe terms in E[[d]] written g^n.Nabla_(m|b).g^n&#39; = g^nl.M_m.B_b.g^nr.
Definition: gNg.h:34
E_op rfrac(const E_op &f) const
right residuation
Definition: E_op.cpp:234
static E_op Nabla(unsigned m, unsigned b)
E_op::Nabla(m,b) is the . composed operator.
Definition: E_op.cpp:31
Class for pseudo - periodic functions with oplus=min and otimes=composition.
Definition: Fminp.h:24
E_op inf(const E_op &f) const
Infimum of E_op elements.
Definition: E_op.cpp:214
E_op oplus(const E_op &f) const
Sum of E_op elements.
Definition: E_op.cpp:198
void reduce()
Reduce to the canonical form.
Definition: E_op.cpp:138
Fminp getFw() const
Returns the Fminp Counter-to-counter function.
Definition: E_op.cpp:181
int Fw(int ki) const
Gives the evaluation of the underlying Fw (Counter-to-counter function)
Definition: E_op.cpp:176
Class to describe E-operators which are coefficients of terms in E[[d]]. One E_op element is defined ...
Definition: E_op.h:20
E_op lfrac(const E_op &f) const
left residuation
Definition: E_op.cpp:227
E_op extendBy(unsigned mul) const
Extend the E-operator in a non canonical form.
Definition: E_op.cpp:128
static E_op Gamma(int n)
E_op::Gamma(n) is the E-operator.
Definition: E_op.cpp:72