(Event+Time).Variant Operators  2.3
Operators for Timed Discrete Event Systems in Dioids
gNg.h
Go to the documentation of this file.
1 #ifndef gNg_H
2 #define gNg_H
3 #include<string>
4 #include<utility>
5 #include <iostream>
6 
7 #include "../Fper/Fminp.h"
8 
9 
18 namespace etvo
19 {
20 class E_op;
21 
34 class gNg
35 {
36  public:
41  static void setCanonForm(unsigned val=0); //0=Left 1=Center 2=Right
42  static unsigned getCanonForm();
43 
45  gNg(int nl,unsigned int m,int nc,unsigned int b,int nr);
47  gNg(int nl,unsigned int m,unsigned int b,int nr);
49  gNg(int nl,unsigned int mb,int nr);
51  gNg(int nc=0);
52 
55  int getNl() const;
57  unsigned int getM() const;
60  int getNc() const;
62  unsigned int getB() const;
65  int getNr() const;
66 
67 
68  bool operator<=(const gNg & m) const;
69  bool operator>=(const gNg & m) const;
70  bool operator==(const gNg & m) const;
71 
73  void canon();
75  void canonL();
77  void canonC();
79  void canonR();
80 
82  int Fw(int ki) const;
84  Fminp getFw() const;
85 
87  E_op extendBy(unsigned mul) const;
88 
90  std::pair<unsigned,unsigned> getPeriodicity() const;
91 
97  std::string toString(unsigned nVer=0) const;
98 
99  bool isEpsilon() { return false; }
100  protected:
102  static unsigned _canon;
104  int _nl;
105  unsigned int _m;
106  int _nc;
107  unsigned int _b;
108  int _nr;
109 };
110 
112  std::ostream & operator<<(std::ostream & f, const gNg & m);
113 }
114 #endif // gNg_H
gNg(int nl, unsigned int m, int nc, unsigned int b, int nr)
Create term g^nl.M_m.g^nc.B_b.g^nr.
Definition: gNg.cpp:22
int _nl
nl,m,b,nr
Definition: gNg.h:104
int getNr() const
Definition: gNg.cpp:68
std::pair< unsigned, unsigned > getPeriodicity() const
returns periodicity as a pair <_b,_m>
Definition: gNg.cpp:209
int getNl() const
Definition: gNg.cpp:50
void canonR()
set to the Right form [0<=nl<=m-1 and nc=0]
Definition: gNg.cpp:135
static void setCanonForm(unsigned val=0)
Definition: gNg.cpp:13
void canonC()
set to the Central [0<=nl<=m-1 and 0<=nr<=b-1]
Definition: gNg.cpp:152
std::ostream & operator<<(std::ostream &f, const dDd &m)
Definition: dDd.cpp:313
Definition: etvoException.cpp:5
unsigned int getB() const
getter : gives b in g^nl.M_m.g^nc.B_b.g^nr
Definition: gNg.cpp:64
int Fw(int ki) const
value of C/C function Fw(ki) = floor(((nr+ki)/b)+nc)*m+nl
Definition: gNg.cpp:174
void canon()
set to the canonical form (depends on setCanonForm choice)
Definition: gNg.cpp:102
void canonL()
set to the Left form [0<=nr<=b-1 and nc=0]
Definition: gNg.cpp:118
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
int getNc() const
Definition: gNg.cpp:59
E_op extendBy(unsigned mul) const
Extension of g^nl M_m B_b g^nr -> SUM_i g^(nl+i* M_(mul*m) B_(mul*_b) g^(mul-1) ....
Definition: gNg.cpp:191
static unsigned _canon
set the canonical form of gNg (default left form)
Definition: gNg.h:102
Class for pseudo - periodic functions with oplus=min and otimes=composition.
Definition: Fminp.h:24
std::string toString(unsigned nVer=0) const
Definition: gNg.cpp:214
unsigned int getM() const
getter : gives m in g^nl.M_m.g^nc.B_b.g^nr
Definition: gNg.cpp:54
Class to describe E-operators which are coefficients of terms in E[[d]]. One E_op element is defined ...
Definition: E_op.h:20
Fminp getFw() const
returns function Fw as a Fminp object
Definition: gNg.cpp:180