59 bool contains(T value)
const {
return ( d_start <= value && d_end >= value ); }
86 QList< Interval<T> > list;
87 if( (src_iv == minus_iv) || (minus_iv.
contains(src_iv)) )
92 else if( src_iv.
end() <= minus_iv.
end() )
105 QList< Interval<T> > list;
106 if( before < i.
start() || before > i.
end() )
127 for(
int c=0; c<list->size(); c++)
129 if( list->at(c).touches(i) || list->at(c).intersects(i) )
145 for(
int c=0; c<list->size(); c++)
151 list->replace(c, temp);
160 QList< Interval<T> > temp_list;
161 for(
int c=0; c<list->size(); c++)
163 temp_list =
subtract(list->at(c), i);
164 if(temp_list.isEmpty())
168 list->replace(c, temp_list.at(0));
169 if(temp_list.size()>1)
170 list->insert(c, temp_list.at(1));
175 QList< Interval<T> > *tmp1, *tmp2;
176 tmp1 =
new QList< Interval<T> >();
177 *tmp1 << *static_cast< Interval<T>* >(
this);
179 tmp2 =
new QList< Interval<T> >();
185 QList< Interval<T> > result = *tmp1;
191 return "[" + QString::number(
d_start) +
"," + QString::number(
d_end) +
"]";