intervals.cpp
109 intervals.append(SimpleInterval::fromString(str.mid(startInterval, (curPos - startInterval + 1)), &conversionOk));
277 } else if ((it1->start >= it2->start) && (it1->start <= it2->end) && (it1->end >= it2->end)) { // Condition d
282 } else if ((it1->start <= it2->start) && (it1->end >= it1->start) && (it1->end <= it2->end)) { // Condition e
294 qFatal("Unexpected condition in %s at line %d (segments intersection). it1->start = %f, it2->start = %f, it1->end = %f, it2->end = %f", __FILE__, __LINE__, it1->start, it2->start, it1->end, it2->end);
422 } else if ((it1->start >= it2->start) && (it1->start < it2->end) && (it1->end > it2->end)) { // Condition d
425 } else if ((it1->start < it2->start) && (it1->end > it1->start) && (it1->end <= it2->end)) { // Condition e
434 } else { // We should never get here (if we get here, try to check whether the equality is checked correctly)
435 qFatal("Unexpected condition in %s at line %d (segments subtraction). it1->start = %f, it2->start = %f, it1->end = %f, it2->end = %f", __FILE__, __LINE__, it1->start, it2->start, it1->end, it2->end);
445 template void Intervals::intersect<QLinkedList<farsa::SimpleInterval>::const_iterator>(QLinkedList<farsa::SimpleInterval>::const_iterator otherBegin, QLinkedList<farsa::SimpleInterval>::const_iterator otherEnd);
446 template void Intervals::intersect<const farsa::SimpleInterval*>(const farsa::SimpleInterval* otherBegin, const farsa::SimpleInterval* otherEnd);
447 template void Intervals::unite<QLinkedList<farsa::SimpleInterval>::const_iterator>(QLinkedList<farsa::SimpleInterval>::const_iterator otherBegin, QLinkedList<farsa::SimpleInterval>::const_iterator otherEnd);
448 template void Intervals::unite<const farsa::SimpleInterval*>(const farsa::SimpleInterval* otherBegin, const farsa::SimpleInterval* otherEnd);
449 template void Intervals::subtract<QLinkedList<farsa::SimpleInterval>::const_iterator>(QLinkedList<farsa::SimpleInterval>::const_iterator otherBegin, QLinkedList<farsa::SimpleInterval>::const_iterator otherEnd);
450 template void Intervals::subtract<const farsa::SimpleInterval*>(const farsa::SimpleInterval* otherBegin, const farsa::SimpleInterval* otherEnd);
FARSA_UTIL_TEMPLATE const T max(const T &t1, const U &t2)
Template for max calculation.
Definition: mathutils.h:154
bool operator==(const Intervals &other) const
Returns true if this and other are the same.
Definition: intervals.cpp:175
const_iterator begin() const
Returns a const iterator to the beginning of the list of simple intervals.
Definition: intervals.h:324
Intervals & unite(const Intervals &other)
Unites intervals in this with other.
Definition: intervals.h:477
QLinkedList< SimpleInterval >::const_iterator const_iterator
The const iterator on simple intervals.
Definition: intervals.h:224
static QVector< SimpleInterval > vectorOfSimpleIntervalsFromString(QString s, bool *ok=NULL)
Converts the given string to a vector of simple intervals.
Definition: intervals.cpp:73
FARSA_UTIL_TEMPLATE const T min(const T &t1, const U &t2)
Template for min calculation.
Definition: mathutils.h:136
const_iterator end() const
Returns a const iterator to the end of the list of simple intervals.
Definition: intervals.h:349
static SimpleInterval fromString(QString str, bool *ok=NULL)
Converts the given string to a SimpleInterval.
Definition: intervals.cpp:25
bool valueIn(real v) const
Returns true if the given value belongs to these intervals.
Definition: intervals.cpp:198
static QString vectorOfSimpleIntervalsToString(QVector< SimpleInterval > v)
Converts a vector of simple intervals to string.
Definition: intervals.cpp:59
Intervals & subtract(const Intervals &other)
Subtracts intervals from other to these ones.
Definition: intervals.h:604
Intervals & intersect(const Intervals &other)
Intersects intervals in this with other.
Definition: intervals.h:407