28 #include <QLinkedList>
32 #include "mathutils.h"
117 return start < other.
start;
138 return (start == other.
start) && (end == other.
end);
146 operator QString()
const
148 return QString(
"[%1, %2]").arg(start).arg(end);
156 QString toString()
const
180 static QString vectorOfSimpleIntervalsToString(QVector<SimpleInterval> v);
192 static QVector<SimpleInterval> vectorOfSimpleIntervalsFromString(QString s,
bool* ok = NULL);
252 template <
class List_t>
257 for (
typename List_t::const_iterator it = list.begin(); it != list.end(); it++) {
268 m_length(other.m_length),
269 m_intervals(other.m_intervals)
293 operator QString()
const;
300 QString toString()
const
326 return m_intervals.begin();
339 return m_intervals.constBegin();
351 return m_intervals.end();
363 return m_intervals.constEnd();
371 const QLinkedList<SimpleInterval>& getSimpleIntervalList()
const
383 return m_intervals.isEmpty();
393 return m_intervals.empty();
421 intersect(&i, &i + 1);
457 return intersect(other);
468 return intersect(value);
504 return i.
unite(other);
516 return intrv.
unite(i);
550 return i.
unite(other);
562 return intrv.
unite(i);
618 subtract(&i, &i + 1);
654 return subtract(other);
665 return subtract(value);
677 return !(*
this == other);
687 bool operator==(
const Intervals& other)
const;
695 bool valueIn(
real v)
const;
701 void recomputeLength();
711 template <
class OtherIterator_t>
712 void intersect(OtherIterator_t otherBegin, OtherIterator_t otherEnd);
721 template <
class OtherIterator_t>
722 void unite(OtherIterator_t otherBegin, OtherIterator_t otherEnd);
732 template <
class OtherIterator_t>
733 void subtract(OtherIterator_t otherBegin, OtherIterator_t otherEnd);