SciDAVis
1.D4
|
Auxiliary class for interval based data. More...
#include <Interval.h>
Public Member Functions | |
Interval () | |
Interval (T start, T end) | |
Interval (const Interval< T > &other) | |
bool | isValid () const |
T | size () const |
bool | touches (const Interval< T > &other) const |
Returns true if no gap is between two intervals. | |
Public Member Functions inherited from IntervalBase< T > | |
bool | contains (const Interval< T > &other) const |
bool | contains (T value) const |
T | end () const |
bool | intersects (const Interval< T > &other) const |
IntervalBase () | |
IntervalBase (const IntervalBase< T > &other) | |
IntervalBase (T start, T end) | |
QList< Interval< T > > | operator- (QList< Interval< T > > subtrahend) |
Interval< T > & | operator= (const Interval< T > &other) |
bool | operator== (const Interval< T > &other) const |
void | setEnd (T end) |
void | setStart (T start) |
T | start () const |
QString | toString () const |
Return a string in the format '[start,end]'. | |
void | translate (T offset) |
virtual | ~IntervalBase () |
Additional Inherited Members | |
Static Public Member Functions inherited from IntervalBase< T > | |
static Interval< T > | intersection (const Interval< T > &first, const Interval< T > &second) |
Return the intersection of two intervals. | |
static Interval< T > | merge (const Interval< T > &a, const Interval< T > &b) |
Merge two intervals that touch or intersect. | |
static void | mergeIntervalIntoList (QList< Interval< T > > *list, Interval< T > i) |
Merge an interval into a list. | |
static void | restrictList (QList< Interval< T > > *list, Interval< T > i) |
Restrict all intervals in the list to their intersection with a given interval. | |
static QList< Interval< T > > | split (const Interval< T > &i, T before) |
Split an interval into two. | |
static QList< Interval< T > > | subtract (const Interval< T > &src_iv, const Interval< T > &minus_iv) |
Subtract an interval from another. | |
static void | subtractIntervalFromList (QList< Interval< T > > *list, Interval< T > i) |
Subtract an interval from all intervals in the list. | |
Protected Attributes inherited from IntervalBase< T > | |
T | d_end |
Interval end. | |
T | d_start |
Interval start. |
Auxiliary class for interval based data.
This class represents an interval of the type [start,end]. It should be pretty self explanatory.
For the template argument (T), only numerical types ((unsigned) short, (unsigned) int, (unsigned) long, float, double, long double) are supported.
|
inline |
Referenced by IntervalBase< long double >::restrictList(), and Column::Private::setDateTimeAt().
|
inline |
Returns true if no gap is between two intervals.
Implements IntervalBase< T >.
Referenced by IntervalBase< long double >::merge().