Merging overlapping spans/ranges

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Tue May 10 11:42:56 EDT 2005


This is the problem of finding the connected components inside an
interval graph. You can implement the algorithms yourself, of you can
use my graph data structure here:

http://sourceforge.net/projects/pynetwork/

The graph methods:
createIntervalgGraph
And:
connectedComponents
can probably solve your problem quite fast, algorithmically, and with
few lines of code.
If you need more help, then ask for it and I'll give the little code
needed.

Bear hugs,
Bearophile




More information about the Python-list mailing list