(Event+Time).Variant Operators  2.3
Operators for Timed Discrete Event Systems in Dioids
Tg.h
1 #ifndef TG_H
2 #define TG_H
3 #include "../etop/T_op.h"
4 #include "../grafic/PovRay.h"
5 #include<iostream>
6 
7 namespace etvo
8 {
9 
10  class polyTg;
11  class seriesTg;
22 class Tg
23 {
24  public:
26  static Tg E();
28  static Tg g(int n);
30  static Tg D(unsigned vw); // Delta_vw
32  static Tg d(int t); // delta^t
34  static Tg V(unsigned int v);
36  static Tg W(unsigned int w);
37 
38 
40  Tg();
42  Tg(int t,int n);
44  Tg(int t,unsigned vw,int tp, int n);
46  Tg(int tl, unsigned v,unsigned w, int tr, int n);
48  Tg(const T_op & w, int g);
49 
51  T_op getT_op() const;
53  void setT_op(const T_op & );
55  int getG() const;
57  void setG(int n);
58 
60  void getGain(unsigned int & vee, unsigned int & wedge) const;
61 
63  Tg operator*(const Tg & ) const;
65  Tg otimes(const Tg &) const;
66 
68  polyTg operator*(const polyTg &) const;
70  polyTg otimes(const polyTg &) const;
71 
72  // TODO
73  seriesTg operator*(const seriesTg &) const;
74  seriesTg otimes(const seriesTg &) const;
75 
77  polyTg oplus(const Tg &) const;
79  polyTg operator+(const Tg &) const;
81  polyTg oplus(const polyTg &) const;
83  polyTg operator+(const polyTg &) const;
84 
86  Tg inf(const Tg & )const;
87 
88  Tg lfrac(const Tg &) const;
89  Tg rfrac(const Tg &) const;
90 
92  std::string toString() const;
94  std::string toStringAsDeltaVar() const;
95 
97  void canon();
98 
100  bool operator==(const Tg & ) const;
101  bool operator!=(const Tg &) const;
102  bool operator<=(const Tg &) const;
103  bool operator>=(const Tg &) const;
104 
106  void toPov(graphicPR::PovRay & pov, graphicPR::PovRay::Color c, Tg * prec, Tg* next);
107  private:
108  int _g;
109  T_op _w;
110 };
112  std::ostream & operator<<(std::ostream & st,const Tg & m);
113 }
114 
115 #endif // TG_H
polyTg oplus(const Tg &) const
returns the sum of the current Tg term with Tg term. It is a polynomial
Definition: Tg.cpp:96
static Tg W(unsigned int w)
basic Wedge (time divisor) operator as Tg element: Tg::W(w)= W_w.g0
Definition: Tg.cpp:21
void setT_op(const T_op &)
sets the T-operator
Definition: Tg.cpp:39
void getGain(unsigned int &vee, unsigned int &wedge) const
gives the gain vee/wedge of the T-operator w of w.d^t
Definition: Tg.cpp:54
Tg inf(const Tg &) const
returns the infimum of two Tg terms
Definition: Tg.cpp:111
bool operator==(const Tg &) const
checks terms equality
Definition: Tg.cpp:149
the script description of a color in POV-Ray
Definition: PovRay.h:38
Tg operator*(const Tg &) const
returns the product of two Tg terms
Definition: Tg.cpp:61
Class for ultimately-periodic series in the semiring T[[g]].
Definition: seriesTg.h:25
static Tg V(unsigned int v)
basic Vee (time multiplier) operator as Tg element: Tg::V(v)= V_v.g0
Definition: Tg.cpp:19
Class for monomials in the semiring T[[g]].
Definition: Tg.h:22
static Tg D(unsigned vw)
basic Delta_vw operator as Tg element: Tg::D(vw)= D_vw.g0
Definition: Tg.cpp:15
void canon()
puts the current term into a canonical form
Definition: Tg.cpp:145
std::ostream & operator<<(std::ostream &f, const dDd &m)
Definition: dDd.cpp:313
Definition: etvoException.cpp:5
static Tg d(int t)
basic delta operator as Tg element: Tg::d(t)= dt.g0
Definition: Tg.cpp:17
std::string toString() const
returns a string which describes the current Tg term
Definition: Tg.cpp:127
Class to describe T-operators which are coefficients of terms in T[[g]].
Definition: T_op.h:17
void setG(int n)
sets the exponent n of w.gn
Definition: Tg.cpp:49
int getG() const
returns the exponent n of the current term w.gn
Definition: Tg.cpp:44
Tg otimes(const Tg &) const
returns the product of two Tg terms
Definition: Tg.cpp:66
static Tg g(int n)
basic gamma operator as Tg element: Tg::g(n)= d0.gn
Definition: Tg.cpp:13
Tg()
init as neutral opertor (d0.g0)
Definition: Tg.cpp:24
void toPov(graphicPR::PovRay &pov, graphicPR::PovRay::Color c, Tg *prec, Tg *next)
used to create PovRay graphical output
Definition: Tg.cpp:168
polyTg operator+(const Tg &) const
returns the sum of the current Tg term with Tg term. It is a polynomial
Definition: Tg.cpp:91
static Tg E()
neutral operator as Tg element (d0.g0)
Definition: Tg.cpp:11
std::string toStringAsDeltaVar() const
returns a string which describes the current Tg term as a variable delta operator ...
Definition: Tg.cpp:138
T_op getT_op() const
returns w, the T-operator of the current term
Definition: Tg.cpp:35
Used to generate POV-Ray scripts to draw 3D descriptions of polyEd and polyTg objects.
Definition: PovRay.h:19
Class for polynomials in the semiring T[[g]].
Definition: polyTg.h:23