(Event+Time).Variant Operators  2.3
Operators for Timed Discrete Event Systems in Dioids
T_op.h
1 #ifndef TOP_H
2 #define TOP_H
3 #include<utility>
4 #include "dDd.h"
5 #include "../Fper/Fmaxp.h"
6 
7 namespace etvo
8 {
17 class T_op
18 {
19  public:
21  static T_op E();
23  static T_op Vee(unsigned v);
25  static T_op Wedge(unsigned w);
27  static T_op Delta(unsigned vw);
29  static T_op Delta(unsigned v,unsigned w);
31  static T_op deltaVar(const std::vector<int> & delays);
33  static T_op delta(int t);
34 
35  public:
36 
38  T_op();
40  T_op(const dDd & term);
42  void add(const dDd & term);
44  void add(const T_op & op);
45 
47  std::pair<unsigned,unsigned> getPeriodicity() const;
48 
50  std::vector<dDd> getTerms() const;
51 
53  unsigned getV() const;
55  unsigned getW() const;
56 
58  T_op extendBy(unsigned mul) const;
60  void reduce();
61 
63  std::string toString() const;
65  std::string toStringAsDeltaVar() const;
66 
68  int Rw(int ki) const;
70  Fmaxp getRw() const;
72  void setFromRw(const Fmaxp &);
73 
75  T_op operator+(const T_op & f) const;
77  T_op oplus(const T_op & f) const;
78 
80  T_op operator*(const T_op & f) const;
82  T_op otimes(const T_op & f) const;
84  T_op inf(const T_op & f) const;
85 
87  T_op lfrac(const T_op & f) const;
89  T_op rfrac(const T_op & f) const;
90 
92  bool operator==(const T_op & w) const;
94  bool operator!=(const T_op & w) const;
95 
96  bool operator<=(const T_op & w) const;
97  bool operator>=(const T_op & w) const;
98  bool operator>(const T_op & w) const;
99  bool operator<(const T_op & w) const;
100 
101  static T_op leastCausal(unsigned v, unsigned w);
102  protected:
103  Fmaxp _fper;
104 
105 };
106  std::ostream & operator<<(std::ostream & f, const T_op & m);
107 }
108 #endif // TOP_H
void reduce()
Reduce to the canonical form.
Definition: T_op.cpp:134
T_op lfrac(const T_op &f) const
Returns the residuation of left composition of T_ops.
Definition: T_op.cpp:222
static T_op deltaVar(const std::vector< int > &delays)
delta^<t1,t2..>
Definition: T_op.cpp:38
std::string toStringAsDeltaVar() const
returns a string description as d<seq> coefficients, only for a (T,T) periodic operator ...
Definition: T_op.cpp:152
bool operator!=(const T_op &w) const
checks inequality
Definition: T_op.cpp:241
std::string toString() const
returns a string which describes the T-operator
Definition: T_op.cpp:140
unsigned getW() const
Returns the W value (time division) in the (W,V) periodicity.
Definition: T_op.cpp:118
std::ostream & operator<<(std::ostream &f, const dDd &m)
Definition: dDd.cpp:313
Definition: etvoException.cpp:5
static T_op E()
neutral T_op
Definition: T_op.cpp:12
void add(const dDd &term)
Add a dDd term to the current T-operator.
Definition: T_op.cpp:88
std::pair< unsigned, unsigned > getPeriodicity() const
returns the periodicity of the Rw release-time function (W,V)
Definition: T_op.cpp:93
static T_op Wedge(unsigned w)
Wedge_w time divisor.
Definition: T_op.cpp:24
T_op operator+(const T_op &f) const
Returns the sum (max) of T_ops.
Definition: T_op.cpp:190
T_op inf(const T_op &f) const
Returns the min of T_ops.
Definition: T_op.cpp:215
static T_op delta(int t)
delta^t
Definition: T_op.cpp:65
Class for pseudo - periodic functions with oplus=max and otimes=composition.
Definition: Fmaxp.h:22
T_op extendBy(unsigned mul) const
Extend the T-operator in a non canonical form.
Definition: T_op.cpp:123
unsigned getV() const
Returns the V value (time multiplication) in the (W,V) periodicity.
Definition: T_op.cpp:113
Class to describe T-operators which are coefficients of terms in T[[g]].
Definition: T_op.h:17
static T_op Delta(unsigned vw)
Delta_vw.
Definition: T_op.cpp:28
static T_op Vee(unsigned v)
Vee_v time multiplier.
Definition: T_op.cpp:19
void setFromRw(const Fmaxp &)
Sets from a release-time function.
Definition: T_op.cpp:184
bool operator==(const T_op &w) const
checks equality
Definition: T_op.cpp:236
T_op rfrac(const T_op &f) const
Returns the residuation of right composition of T_ops.
Definition: T_op.cpp:229
terms like d^tl.V_m.d^tc.W_b.d^tr
Definition: dDd.h:35
T_op()
neutral T_op
Definition: T_op.cpp:71
T_op oplus(const T_op &f) const
Returns the sum (max) of T_ops.
Definition: T_op.cpp:197
T_op otimes(const T_op &f) const
Returns the composition of T_ops.
Definition: T_op.cpp:210
std::vector< dDd > getTerms() const
returns the collection of dDd terms
Definition: T_op.cpp:98
T_op operator*(const T_op &f) const
Returns the composition of T_ops.
Definition: T_op.cpp:203
Fmaxp getRw() const
Returns the release-time function.
Definition: T_op.cpp:179
int Rw(int ki) const
Release time evaluation.
Definition: T_op.cpp:174