(Event+Time).Variant Operators  2.3
Operators for Timed Discrete Event Systems in Dioids
dDd.h
Go to the documentation of this file.
1 #ifndef DDD_H
2 #define DDD_H
3 
4 #include<string>
5 #include<utility>
6 #include <iostream>
7 
8 #include "../Fper/Fmaxp.h"
9 
18 namespace etvo
19 {
20  class T_op; //anticipated declaration
21 
33 
35 class dDd
36 {
37  public:
42  static void setCanonForm(unsigned val=0);
44  static unsigned getCanonForm();
45 
47  dDd(int tl, unsigned int v, int tc,unsigned int w,int tr);
49  dDd(int tl, unsigned int v, unsigned int w, int tr);
51  dDd(int tl,unsigned int vw,int tr);
52 
54  dDd(int tc=0);
55 
57  int getTl() const;
59  unsigned int getV() const;
61  int getTc() const;
63  unsigned int getW() const;
65  int getTr() const;
66 
68  bool operator<=(const dDd & m) const;
69  bool operator>=(const dDd & m) const;
70  bool operator==(const dDd & m) const;
71 
72 
74  void canon();
76  void canonL();
78  void canonC();
80  void canonR();
81 
83  int Rw(int ki) const;
85  Fmaxp getRw() const;
86 
88  T_op extendBy(unsigned mul) const;
89 
91  std::pair<unsigned,unsigned> getPeriodicity() const;
92 
95  std::string toString(unsigned nVer=0) const;
96 
97  bool isEpsilon() { return false; }
98  protected:
100  static unsigned _canon;
102  int _tl;
103  unsigned int _v;
104  int _tc;
105  unsigned int _w;
106  int _tr;
107 };
109  std::ostream & operator<<(std::ostream & f, const dDd & m);
110 
111 }
112 #endif // DDD_H
unsigned int getW() const
getter : gives w in d^tl V_v d^tc W_w d^tr
Definition: dDd.cpp:71
static unsigned _canon
set canonical form of dDd (default left form)
Definition: dDd.h:100
int Rw(int ki) const
value of Release function Rw(ti) = ceil(((tr+ti)/W)+tc)*V+tl
Definition: dDd.cpp:207
bool operator<=(const dDd &m) const
comparison of terms (with the same Periodicity)
Definition: dDd.cpp:86
std::pair< unsigned, unsigned > getPeriodicity() const
periodicity as a pair <_b,_m>
Definition: dDd.cpp:223
std::ostream & operator<<(std::ostream &f, const dDd &m)
Definition: dDd.cpp:313
Definition: etvoException.cpp:5
int getTr() const
getter : gives tr in d^tl V_v d^tc W_w d^tr
Definition: dDd.cpp:76
Class for pseudo - periodic functions with oplus=max and otimes=composition.
Definition: Fmaxp.h:22
Class to describe T-operators which are coefficients of terms in T[[g]].
Definition: T_op.h:17
std::string toString(unsigned nVer=0) const
Definition: dDd.cpp:229
void canonL()
set to the Left form [-w<tr<=0 and tc=0]
Definition: dDd.cpp:118
unsigned int getV() const
getter : gives v in d^tl V_v d^tc W_w d^tr
Definition: dDd.cpp:61
Fmaxp getRw() const
returns function Rw
Definition: dDd.cpp:213
terms like d^tl.V_m.d^tc.W_b.d^tr
Definition: dDd.h:35
int getTl() const
getter : gives tl in d^tl V_v d^tc W_w d^tr
Definition: dDd.cpp:57
T_op extendBy(unsigned mul) const
Extension of d^tl V_v d^tc W_w d^tr.
Definition: dDd.cpp:289
dDd(int tl, unsigned int v, int tc, unsigned int w, int tr)
Create term d^tl.V_v.d^tc.W_w.d^tr.
Definition: dDd.cpp:23
int _tl
tl,v,tc,w,tr
Definition: dDd.h:102
static void setCanonForm(unsigned val=0)
set the type of canonical form 0=left 1=center 2=right
Definition: dDd.cpp:17
void canonR()
set Right form [-v<tl<=0 and tc=0]
Definition: dDd.cpp:142
int getTc() const
getter : gives tc in d^tl V_v d^tc W_w d^tr
Definition: dDd.cpp:66
void canonC()
set to the Central form [-w<tr<=0 and -v<tl<=0]
Definition: dDd.cpp:166
void canon()
set to the canonical form (depends on the choice made by setCanonForm)
Definition: dDd.cpp:100