I have a list of closed intervals sorted in ascending order by the left 
bound.

For example, [Interval(1,2), Interval(1,5)]. There is no sorting by right 
bouns, so  [Interval(1,5), Interval(1,2)] is also possible.

I want to get list of disjoint closed intervals. For example, 
[Interval(1,2), Interval(1,5), Interval(2,3)]  should become 
[Interval(1,2), Interval(2,3), Interval(3,5)] (again sorted by the left 
bound).

What is the best way to do it? Will the problem become harder if the list 
is unsorted?

Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/sympy/e2480c3a-2704-4715-8624-ee34b96d95c9n%40googlegroups.com.

Reply via email to