| |
libFAUDES
Sections
Index
|
faudes::TimeInterval Class Reference |
Public Member Functions | |
TimeInterval (void) | |
Default constructor - sets time interval to (-inf; +inf). | |
~TimeInterval (void) | |
Default destructor. | |
void | LB (tpTime::Type time) |
Set the lower bound to a given value. | |
void | UB (tpTime::Type time) |
Set the upper bound to a given value. | |
void | UBincl (bool incl) |
Configures the upper bound to be inclusive. | |
void | LBincl (bool incl) |
Configures the lower bound to be inclusive. | |
void | setUBinf (void) |
Set upper bound to infinity. | |
void | setLBinf (void) |
Set lower bound to infinity. | |
tpTime::Type | UB (void) const |
Return upper bound. | |
tpTime::Type | LB (void) const |
Return lower bound. | |
bool | LBincl (void) const |
Test for lower bound inclusive. | |
bool | UBincl (void) const |
Test for upper bound inclusive. | |
bool | LBinf (void) const |
Test for lower bound infinity. | |
bool | UBinf (void) const |
Test for upper bound infinity. | |
void | Canonical (void) |
Convert to canonical representation. | |
void | SetFull (void) |
Set to full (-inf, +inf). | |
void | SetEmpty (void) |
Set to empty (1, -1). | |
void | SetPositive (void) |
Set to positive [0, inf). | |
void | SetNegative (void) |
Set to negative (-inf, 0]. | |
bool | Full (void) const |
Test whether interval is full. | |
bool | Empty (void) const |
Test interval for empty set. | |
bool | IncludesPositive (void) const |
Test whether interval includes [0,inf). | |
bool | IncludesNegative (void) const |
Test whether interval includes (-inf,0]. | |
bool | In (tpTime::Type time) const |
Test whether a point satisfies interval. | |
bool | operator== (const TimeInterval &rOtherInterval) const |
Test whether two intervals are equal. | |
bool | operator!= (const TimeInterval &rOtherInterval) const |
Test whether two intervals not equal. | |
void | PositiveLeftShift (tpTime::Type time) |
Transform by left shift and intersection with [0, inf). | |
void | Intersect (const TimeInterval &rOtherInterval) |
Intersect this interval with other interval. | |
void | Merge (const TimeInterval &rOtherInterval) |
Merge this interval with other interval. | |
std::string | Str (void) const |
Pretty printable string. | |
Static Public Member Functions | |
static TimeInterval | Intersect (const TimeInterval &rInterval1, const TimeInterval &rInterval2) |
Intersection of two time intervals. | |
static TimeInterval | Merge (const TimeInterval &rInterval1, const TimeInterval &rInterval2) |
Merge this interval with other interval. | |
Private Attributes | |
tpTime::Type | mstUB |
Upper bound. | |
tpTime::Type | mstLB |
Lower bound. | |
bool | mbUBincl |
Flag to indicate that the upper bound is part of the interval. | |
bool | mbLBincl |
Flag to indicate that lower boundary is part of the interval. |
faudes::TimeInterval::TimeInterval | ( | void | ) | [inline] |
Default constructor - sets time interval to (-inf; +inf).
Definition at line 93 of file tp_timeinterval.h.
faudes::TimeInterval::~TimeInterval | ( | void | ) | [inline] |
void faudes::TimeInterval::LB | ( | tpTime::Type | time | ) | [inline] |
Set the lower bound to a given value.
If the value is minus infinity, it is set exclusive. Otherwise, the exclusive/inclusive flag is kept.
time | The new value of lower bound |
Definition at line 108 of file tp_timeinterval.h.
void faudes::TimeInterval::UB | ( | tpTime::Type | time | ) | [inline] |
Set the upper bound to a given value.
If the value is infinity, it is set exclusive. Otherwise, the exclusive/inclusive flag is kept.
time | The new value of upper bound |
Definition at line 124 of file tp_timeinterval.h.
void faudes::TimeInterval::UBincl | ( | bool | incl | ) | [inline] |
Configures the upper bound to be inclusive.
If the upper bound is infinity, it stays exclusive.
incl |
Definition at line 138 of file tp_timeinterval.h.
void faudes::TimeInterval::LBincl | ( | bool | incl | ) | [inline] |
Configures the lower bound to be inclusive.
If the lower bound is minus infinity, it stays exclusive.
incl |
Definition at line 150 of file tp_timeinterval.h.
void faudes::TimeInterval::setUBinf | ( | void | ) | [inline] |
void faudes::TimeInterval::setLBinf | ( | void | ) | [inline] |
tpTime::Type faudes::TimeInterval::UB | ( | void | ) | const [inline] |
tpTime::Type faudes::TimeInterval::LB | ( | void | ) | const [inline] |
bool faudes::TimeInterval::LBincl | ( | void | ) | const [inline] |
Test for lower bound inclusive.
Definition at line 187 of file tp_timeinterval.h.
bool faudes::TimeInterval::UBincl | ( | void | ) | const [inline] |
Test for upper bound inclusive.
Definition at line 194 of file tp_timeinterval.h.
bool faudes::TimeInterval::LBinf | ( | void | ) | const [inline] |
Test for lower bound infinity.
Definition at line 201 of file tp_timeinterval.h.
bool faudes::TimeInterval::UBinf | ( | void | ) | const [inline] |
Test for upper bound infinity.
Definition at line 208 of file tp_timeinterval.h.
void TimeInterval::Canonical | ( | void | ) |
Convert to canonical representation.
Uses tpTime::Step to convert to aleft closed / right opened representation
Definition at line 16 of file tp_timeinterval.cpp.
void faudes::TimeInterval::SetFull | ( | void | ) | [inline] |
void faudes::TimeInterval::SetEmpty | ( | void | ) | [inline] |
void faudes::TimeInterval::SetPositive | ( | void | ) | [inline] |
void faudes::TimeInterval::SetNegative | ( | void | ) | [inline] |
bool faudes::TimeInterval::Full | ( | void | ) | const [inline] |
Test whether interval is full.
Definition at line 250 of file tp_timeinterval.h.
bool TimeInterval::Empty | ( | void | ) | const |
Test interval for empty set.
Definition at line 30 of file tp_timeinterval.cpp.
bool faudes::TimeInterval::IncludesPositive | ( | void | ) | const [inline] |
Test whether interval includes [0,inf).
Definition at line 266 of file tp_timeinterval.h.
bool faudes::TimeInterval::IncludesNegative | ( | void | ) | const [inline] |
Test whether interval includes (-inf,0].
Definition at line 275 of file tp_timeinterval.h.
bool TimeInterval::In | ( | tpTime::Type | time | ) | const |
Test whether a point satisfies interval.
Definition at line 40 of file tp_timeinterval.cpp.
bool faudes::TimeInterval::operator== | ( | const TimeInterval & | rOtherInterval | ) | const [inline] |
Test whether two intervals are equal.
Note that the test is strictly based on the internal representation, ie [0,10] is not equal to [0,11). This may change in future implementations to consider the tpTime::TypeStep
Definition at line 296 of file tp_timeinterval.h.
bool faudes::TimeInterval::operator!= | ( | const TimeInterval & | rOtherInterval | ) | const [inline] |
Test whether two intervals not equal.
Note that the test is strictly based on the internal representation, ie [0,10] is not equal to [0,11). This may change in future implementations to consider the tpTime::TypeStep
Definition at line 314 of file tp_timeinterval.h.
void TimeInterval::PositiveLeftShift | ( | tpTime::Type | time | ) |
Transform by left shift and intersection with [0, inf).
time | Amount to shift left |
Definition at line 49 of file tp_timeinterval.cpp.
void TimeInterval::Intersect | ( | const TimeInterval & | rOtherInterval | ) |
Intersect this interval with other interval.
rOtherInterval |
Definition at line 85 of file tp_timeinterval.cpp.
TimeInterval TimeInterval::Intersect | ( | const TimeInterval & | rInterval1, | |
const TimeInterval & | rInterval2 | |||
) | [static] |
Intersection of two time intervals.
rInterval1 | Reference of first time interval | |
rInterval2 | Reference of second time interval |
Definition at line 114 of file tp_timeinterval.cpp.
void TimeInterval::Merge | ( | const TimeInterval & | rOtherInterval | ) |
Merge this interval with other interval.
I.e. find smallest superset of the union of the two intervals.
rOtherInterval | Reference to other time interval |
Definition at line 125 of file tp_timeinterval.cpp.
TimeInterval TimeInterval::Merge | ( | const TimeInterval & | rInterval1, | |
const TimeInterval & | rInterval2 | |||
) | [static] |
Merge this interval with other interval.
I.e. find smallest superset of the union of the two intervals.
rInterval1 | Reference of first time interval | |
rInterval2 | Reference of second time interval |
Definition at line 147 of file tp_timeinterval.cpp.
std::string TimeInterval::Str | ( | void | ) | const |
Pretty printable string.
Definition at line 59 of file tp_timeinterval.cpp.
tpTime::Type faudes::TimeInterval::mstUB [private] |
tpTime::Type faudes::TimeInterval::mstLB [private] |
bool faudes::TimeInterval::mbUBincl [private] |
Flag to indicate that the upper bound is part of the interval.
Definition at line 387 of file tp_timeinterval.h.
bool faudes::TimeInterval::mbLBincl [private] |
Flag to indicate that lower boundary is part of the interval.
Definition at line 390 of file tp_timeinterval.h.
libFAUDES 2.14g --- 2009-12-3 --- c++ source docu by doxygen 1.5.6