(Event+Time).Variant Operators  2.3
Operators for Timed Discrete Event Systems in Dioids
Ed.h
1 #ifndef ED_H
2 #define ED_H
3 
4 #include "../etop/E_op.h"
5 #include "../grafic/PovRay.h"
6 #include<iostream>
7 
8 namespace etvo
9 {
10 
11 class polyEd;
12 class seriesEd;
13 
24 class Ed
25 {
26  public:
28  static Ed E();
29 
31  static Ed g(int n);
33  static Ed m(unsigned mul);
35  static Ed N(unsigned mul,unsigned beta);
37  static Ed N(unsigned mb);
39  static Ed b(unsigned b);
41  static Ed d(int d);
42 
43 
45  Ed();
47  Ed(int n, int d);
49  Ed(int n,unsigned m,unsigned b,int np,int d);
51  Ed(int n, unsigned nabla,int np, int d);
53  Ed(const E_op & w, int t);
54 
56  E_op getE_op() const;
58  void setE_op(const E_op & );
60  int getD() const;
62  void setD(int d);
64  void getGain(unsigned int & mu, unsigned int & beta) const;
65 
67  Ed operator*(const Ed & m) const;
69  Ed otimes(const Ed & m) const;
70 
72  polyEd operator*(const polyEd & p) const;
74  polyEd otimes(const polyEd & p) const;
75 
77  seriesEd operator*(const seriesEd & s) const;
79  seriesEd otimes(const seriesEd & s) const;
81  polyEd oplus(const Ed & m) const;
83  polyEd operator+(const Ed & m) const;
85  polyEd oplus(const polyEd & p) const;
87  polyEd operator+(const polyEd & p) const;
88 
90  Ed inf(const Ed & m)const;
92  Ed lfrac(const Ed & m) const;
94  Ed rfrac(const Ed &m) const;
95 
98 
114  std::string toString() const;
115 
119  std::string toStringAsMuVar() const;
120 
122  void canon();
123 
125  bool operator==(const Ed & ) const;
126  bool operator!=(const Ed &) const;
127  bool operator<=(const Ed &) const;
128  bool operator>=(const Ed &) const;
129 
131  void toPov(graphicPR::PovRay & pov, graphicPR::PovRay::Color c,Ed * prec , Ed* next);
132 
133  Ed odot(const Ed & m) const;
134  Ed osum(const Ed & m) const;
135 
136  private:
137  int _d;
138  E_op _w;
139 };
140 
142  std::ostream & operator<<(std::ostream & st,const Ed & m);
143 }
144 #endif // ED_H
Class for polynomials in the semiring E[[d]].
Definition: polyEd.h:31
Ed inf(const Ed &m) const
returns w.d^t =inf(w_this.d^t_this,w_m.d^t_m)
Definition: Ed.cpp:105
static Ed d(int d)
basic operator as Ed element : Ed::d(t) =d^t
Definition: Ed.cpp:25
std::string toString() const
Definition: Ed.cpp:120
the script description of a color in POV-Ray
Definition: PovRay.h:38
void canon()
put in a canonical form
Definition: Ed.cpp:137
static Ed N(unsigned mul, unsigned beta)
basic operator as Ed element : Ed::N(mul,meta) = m_mul.b_beta
Definition: Ed.cpp:19
int getD() const
returns the t (delay) exponent of w.d^t
Definition: Ed.cpp:47
std::ostream & operator<<(std::ostream &f, const dDd &m)
Definition: dDd.cpp:313
polyEd operator+(const Ed &m) const
returns w_this.d^t_this + w_m.d^t_m which is a polynomial polyEd
Definition: Ed.cpp:90
Definition: etvoException.cpp:5
Ed rfrac(const Ed &m) const
returns w.d^t =w_this.d^t_this/w_m.d^t_m
Definition: Ed.cpp:115
void setD(int d)
returns the t exponent (delay) of w.d^t
Definition: Ed.cpp:49
static Ed E()
neutral operator
Definition: Ed.cpp:13
bool operator==(const Ed &) const
check Ed equality
Definition: Ed.cpp:142
Ed operator*(const Ed &m) const
returns w.d^t =w_this.d^t_this * w_m.d^t_m
Definition: Ed.cpp:57
E_op getE_op() const
returns the E-operator w of w.d^t
Definition: Ed.cpp:38
void toPov(graphicPR::PovRay &pov, graphicPR::PovRay::Color c, Ed *prec, Ed *next)
used to create PovRay graphical output
Definition: Ed.cpp:161
static Ed m(unsigned mul)
basic operator as Ed element : Ed::m(mul) = m_mul
Definition: Ed.cpp:17
Class for ultimately-periodic series in the semiring E[[d]]. In a general way, the series are describ...
Definition: seriesEd.h:40
Class for monomials in the semiring E[[d]].
Definition: Ed.h:24
Ed otimes(const Ed &m) const
returns w.d^t =w_this.d^t_this * w_m.d^t_m
Definition: Ed.cpp:62
static Ed b(unsigned b)
basic operator as Ed element : Ed::b(b) = b_b
Definition: Ed.cpp:23
std::string toStringAsMuVar() const
Definition: Ed.cpp:130
Ed lfrac(const Ed &m) const
returns w.d^t =w_m.d^t_m.d^t_this
Definition: Ed.cpp:110
polyEd oplus(const Ed &m) const
returns w_this.d^t_this + w_m.d^t_m which is a polynomial polyEd
Definition: Ed.cpp:86
void setE_op(const E_op &)
sets the E-operator w of w.d^t
Definition: Ed.cpp:42
Class to describe E-operators which are coefficients of terms in E[[d]]. One E_op element is defined ...
Definition: E_op.h:20
Used to generate POV-Ray scripts to draw 3D descriptions of polyEd and polyTg objects.
Definition: PovRay.h:19
void getGain(unsigned int &mu, unsigned int &beta) const
gives the gain mu/beta of the E-operator w of w.d^t
Definition: Ed.cpp:51
static Ed g(int n)
basic operator as Ed element : Ed::g(n)=g^n.d^0
Definition: Ed.cpp:15
Ed()
init as neutral element
Definition: Ed.cpp:28