Go to the documentation of this file.
13#ifndef FAUDES_TP_TIMEINTERVAL_H
14#define FAUDES_TP_TIMEINTERVAL_H
16#include "corefaudes.h"
46 static Type Max( void) { return std::numeric_limits<Int>::max();};
48 static Type Min( void) { return std::numeric_limits<Int>::min()+1;};
50 static Type UnDef( void) { return std::numeric_limits<Int>::min();};
57 if(x<=std::numeric_limits<Float>::min()) return Min();
58 if(x>=std::numeric_limits<Float>::max()) return Max();
63 if(time == UnDef()) return "undef";
64 if(time < Min()) return "err";
65 if(time == Min()) return "-inf";
66 if(time > Max()) return "err";
67 if(time == Max()) return "inf";
106 if(time <= Time::Min()) time=Time::Min();
107 if(time >= Time::Max()) time=Time::Max();
109 if(mstLB==Time::Min()) mbLBincl= false;
122 if(time <= Time::Min()) time=Time::Min();
123 if(time >= Time::Max()) time=Time::Max();
125 if(mstUB==Time::Max()) mbUBincl= false;
137 if(mstUB>=Time::Max()) mbUBincl= false;
149 if(mstLB<=Time::Min()) mbLBincl= false;
157 mstUB=Time::Max(); mbUBincl= false; }
163 mstLB=Time::Min(); mbLBincl= false; }
184 bool LBincl( void) const { return mbLBincl;}
191 bool UBincl( void) const { return mbUBincl;}
198 bool LBinf( void) const { return mstLB == Time::Min(); }
205 bool UBinf( void) const { return mstUB == Time::Max();}
214 void Canonical( void);
220 mstUB=Time::Max(); mstLB=Time::Min(); mbUBincl= false; mbLBincl= false; };
226 mstUB=-1; mstLB=1; mbUBincl= false; mbLBincl= false; };
232 mstUB=Time::Max(); mstLB=0; mbUBincl= false; mbLBincl= true; };
239 mstLB=Time::Min(); mstUB=0; mbUBincl= false; mbLBincl= true; };
247 bool Full( void) const { return (mstUB==Time::Max()) && (mstLB==Time::Min()) ;};
255 bool Empty( void) const;
264 return ( (mstLB<0) || ((mstLB ==0) && mbLBincl) ) && (mstUB==Time::Max());};
273 return ( (mstUB>0) || ((mstUB ==0) && mbUBincl) ) && (mstLB==Time::Min());};
294 if(mstUB!=rOtherInterval. mstUB) return false;
295 if(mstLB!=rOtherInterval. mstLB) return false;
296 if(mbUBincl!=rOtherInterval. mbUBincl) return false;
297 if(mbLBincl!=rOtherInterval. mbLBincl) return false;
312 return ! (* this == rOtherInterval) ;
372 std::string Str( void) const;
bool IncludesNegative(void) const
Time::Type LB(void) const
Time::Type UB(void) const
bool IncludesPositive(void) const
static Type Quantize(Float x)
static std::string Str(Type time)
static Float FromFloat(Float x)
std::string ToStringInteger(Int number)
libFAUDES 2.33k
--- 2025.09.16
--- c++ api documentaion by doxygen
|