(Event+Time).Variant Operators  2.3
Operators for Timed Discrete Event Systems in Dioids
etvo::Fper Class Reference

Base class for pseudo - periodic functions Z->Z where f(x + dP) = codP + f(x) More...

#include <Fper.h>

Inheritance diagram for etvo::Fper:
etvo::Fmaxp etvo::Fminp

Public Member Functions

 Fper ()
 Default constructor : set as Id function Z->Z,x->x.
 
 Fper (int dP, int codP, const std::vector< int > &seq)
 Constructor : full definition. More...
 
void setSeq (const std::vector< int > &seq)
 Set values of f(0),f(1), ... over one period. More...
 
void setPeriodicity (int dP, int codP)
 Set dP/codP. More...
 
std::pair< int, int > getPeriodicity () const
 returns the pair (dP,codP)
 
int getValue (int arg) const
 Value of f(x) More...
 
int operator() (int arg) const
 Value of f(x) More...
 
int getDomPer () const
 
int getCodomPer () const
 
bool operator== (const Fper &f) const
 
bool operator!= (const Fper &f) const
 
bool operator<= (const Fper &f) const
 
bool operator>= (const Fper &f) const
 
Fper extendBy (unsigned mul) const
 Produces a non-canonical extension of a (dP,codP) pseudo-periodic function The result is the equivalent (mulxdP,mulxcodP) pseudo-periodc function.
 
Fper composeWith (const Fper &f) const
 Computes the composition of *this with f. More...
 
Fper sum (const Fper &f) const
 
void reduce ()
 Reduces a non-canonical pseudo-periodic function to the canonical form which has the least period (dP,codP)
 
void canon ()
 
double getyMax0 () const
 
double getyMin0 () const
 
virtual std::string toString () const
 

Static Public Member Functions

static void setAutoReduction (bool on)
 Class method (called by Fper::setAutoReductionState(b)) to set the autoreduction state (ON/OFF)
 
static bool getAutoReductionState ()
 Class method (called by Fper::getAutoReductionState()) to obtain the autoreduction state (ON/OFF)
 

Protected Member Functions

bool reduceBy (unsigned div)
 
void updateYMinMax ()
 
bool isNodecreasing (const std::vector< int > &v)
 

Protected Attributes

int _domP
 domain period
 
int _codomP
 codomain period
 
std::vector< int > _seq
 periodic sequence
 
double _yMax0
 
double _yMin0
 

Static Protected Attributes

static bool _autoreduction =true
 class variable to set ON/OFF the autoreduction More...
 

Detailed Description

Base class for pseudo - periodic functions Z->Z where f(x + dP) = codP + f(x)

Author
BC LH JT LARIS
Version
2.0

Constructor & Destructor Documentation

◆ Fper()

etvo::Fper::Fper ( int  dP,
int  codP,
const std::vector< int > &  seq 
)

Constructor : full definition.

Parameters
dPdomain period
codPcodomain period
seq: values of f(0),f(1), ... over one period

Member Function Documentation

◆ composeWith()

Fper etvo::Fper::composeWith ( const Fper f) const

Computes the composition of *this with f.

Parameters
fan Fper object
Returns
an Fper object

◆ getCodomPer()

int etvo::Fper::getCodomPer ( ) const

returns the codomain period codP

◆ getDomPer()

int etvo::Fper::getDomPer ( ) const

returns the domain period dP

◆ getValue()

int etvo::Fper::getValue ( int  arg) const

Value of f(x)

Parameters
argx
Returns
f(x)

◆ getyMax0()

double etvo::Fper::getyMax0 ( ) const

gives the maximum of f(x) projected on y axis [x=0] parallel to (dP,codP) line This value is important for improving max,min computation between functions

◆ getyMin0()

double etvo::Fper::getyMin0 ( ) const

gives the minimum of f(x) projected on y axis [x=0] parallel to (dP,codP) line This value is important for improving max,min computation between functions

◆ operator()()

int etvo::Fper::operator() ( int  arg) const

Value of f(x)

Parameters
argx
Returns
f(x)

◆ setPeriodicity()

void etvo::Fper::setPeriodicity ( int  dP,
int  codP 
)

Set dP/codP.

Parameters
dPdomain period
codPcodomain period

◆ setSeq()

void etvo::Fper::setSeq ( const std::vector< int > &  seq)

Set values of f(0),f(1), ... over one period.

Parameters
seq: values of f(0),f(1),

◆ toString()

std::string etvo::Fper::toString ( ) const
virtual

Returns a string description of a pseudo-periodic function Ex: "[-7 -7 -3 -3 ](4,5)" for a (4,5) pseudo-periodic function f(0)=-7,f(1)=-7,f(2)=-3 ...

Reimplemented in etvo::Fminp, and etvo::Fmaxp.

Member Data Documentation

◆ _autoreduction

bool etvo::Fper::_autoreduction =true
staticprotected

class variable to set ON/OFF the autoreduction

autoreduction mode default = ON


The documentation for this class was generated from the following files: