SciDAVis
1.D4
|
#include <Interval.h>
Public Member Functions | |
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]'. | |
virtual bool | touches (const Interval< T > &other) const =0 |
Returns true if no gap is between two intervals. | |
void | translate (T offset) |
virtual | ~IntervalBase () |
Static Public Member Functions | |
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 | |
T | d_end |
Interval end. | |
T | d_start |
Interval start. |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
|
inline |
|
inline |
|
inline |
Referenced by future::Table::clearSelectedCells(), IntervalBase< long double >::contains(), IntervalBase< long double >::intersection(), IntervalBase< long double >::intersects(), IntervalBase< long double >::IntervalBase(), String2DoubleFilter::isInvalid(), String2MonthFilter::isInvalid(), String2DateTimeFilter::isInvalid(), String2DayOfWeekFilter::isInvalid(), IntervalBase< long double >::merge(), IntervalBase< long double >::operator=(), IntervalBase< long double >::operator==(), Table::recalculate(), Column::save(), IntervalBase< long double >::setEnd(), IntervalBase< long double >::split(), IntervalBase< long double >::subtract(), Interval< int >::touches(), Interval< float >::touches(), Interval< double >::touches(), and Interval< long double >::touches().
|
inlinestatic |
Return the intersection of two intervals.
This function returns an invalid interval if the two intervals do not intersect.
Referenced by IntervalBase< long double >::restrictList().
|
inline |
Referenced by IntervalBase< long double >::merge(), and IntervalBase< long double >::subtract().
|
inlinestatic |
Merge two intervals that touch or intersect.
Referenced by IntervalBase< long double >::mergeIntervalIntoList().
|
inlinestatic |
Merge an interval into a list.
Referenced by IntervalBase< long double >::mergeIntervalIntoList().
|
inline |
|
inline |
|
inline |
|
inlinestatic |
Restrict all intervals in the list to their intersection with a given interval.
Remark: This may decrease the list size.
|
inline |
|
inline |
|
inlinestatic |
Split an interval into two.
|
inline |
Referenced by future::Table::clearSelectedCells(), IntervalBase< long double >::contains(), future::Table::copy(), Table::handleAspectDescriptionChange(), AbstractSimpleFilter::inputRowsAboutToBeInserted(), AbstractSimpleFilter::inputRowsAboutToBeRemoved(), AbstractSimpleFilter::inputRowsInserted(), AbstractSimpleFilter::inputRowsRemoved(), IntervalBase< long double >::intersection(), IntervalBase< long double >::intersects(), IntervalBase< long double >::IntervalBase(), String2DoubleFilter::isInvalid(), String2MonthFilter::isInvalid(), String2DateTimeFilter::isInvalid(), String2DayOfWeekFilter::isInvalid(), IntervalBase< long double >::merge(), IntervalBase< long double >::operator=(), IntervalBase< long double >::operator==(), Table::recalculate(), future::Table::removeSelectedRows(), Column::save(), IntervalBase< long double >::setStart(), IntervalBase< long double >::split(), IntervalBase< long double >::subtract(), Interval< int >::touches(), Interval< float >::touches(), Interval< double >::touches(), and Interval< long double >::touches().
|
inlinestatic |
Subtract an interval from another.
Referenced by IntervalBase< long double >::operator-(), and IntervalBase< long double >::subtractIntervalFromList().
|
inlinestatic |
Subtract an interval from all intervals in the list.
Remark: This may increase or decrease the list size.
|
inline |
Return a string in the format '[start,end]'.
|
pure virtual |
Returns true if no gap is between two intervals.
Implemented in Interval< long double >, Interval< double >, Interval< float >, Interval< T >, and Interval< int >.
|
inline |
|
protected |
Interval end.
Referenced by IntervalBase< long double >::contains(), IntervalBase< long double >::end(), IntervalBase< long double >::IntervalBase(), IntervalBase< long double >::operator=(), IntervalBase< long double >::operator==(), IntervalBase< long double >::setEnd(), IntervalBase< long double >::toString(), and IntervalBase< long double >::translate().
|
protected |
Interval start.
Referenced by IntervalBase< long double >::contains(), IntervalBase< long double >::IntervalBase(), IntervalBase< long double >::operator=(), IntervalBase< long double >::operator==(), IntervalBase< long double >::setStart(), IntervalBase< long double >::start(), IntervalBase< long double >::toString(), and IntervalBase< long double >::translate().