Author: | Andreas Heger |
---|---|
Release: | $Id$ |
Date: | December 09, 2013 |
Tags: | Python |
combine intervalls. Overlapping intervalls are concatenated into larger intervalls.
complement a list of intervalls with intervalls not in list.
complement a list of intervalls with intervalls not in list and return both.
combine a list of non-overlapping intervalls, and merge those that are less than a certain distance apart.
combine a list of non-overlapping intervalls, and delete those that are too small.
combine intervalls. Overlapping intervalls are reduced to their intersection.
first_from, last_to contain region of current maximum overlapping segment. max_right is maximum extension of any sequence overlapping with current overlapping segment.
remove intervalls that are fully contained in another.
[(10, 100), (20, 50), (70, 120), (130, 200), (10, 50), (140, 210), (150, 200)]
results:
[(10, 100), (70, 120), (130, 200), (140, 210)]
remove intervalls that are full covering another, i.e. always keep the smallest.
[(10, 100), (20, 50), (70, 120), (40,80), (130, 200), (10, 50), (140, 210), (150, 200)]
result:
[(20, 50), (40, 80), (70, 120), (150, 200)]
shorten intervalls, so that there is no overlap with another set of intervalls.
assumption: intervalls are not overlapping
calculate overlap between intervalls.