"Dan Stromberg" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Does anyone have a python implementation (or python C/C+ extension) that > would allow me to perform set operations (union, intersection, > difference, > number of elements, &c) over very large collections of integers? > > Some of the sets may have over 10**11 (probably less than 10**13 > though) integers in them, but there will tend to be runs of integers > being > included or not included, so there might be 10**5 consecutive integers > included, then 10**4 that are not included, and then another 10**6 that > are.
I would call this chunky rather than sparse. Or a set (ordered list) of integer ranges, which I am sure is how you implemented it before. I did not find anything Googling 'Python integer range set' but would look harder before coding. Terry J. Reedy -- http://mail.python.org/mailman/listinfo/python-list