Create a IntegerSet class
For use in FiniteSubset
and in intervals plugins. Must have a limit
keyword argument that default to None
which is the maximum integer value that these objects will contains.
-
do we precise that the constructor must have
Iterable
ofrange
? -
do we move the
intervals
method to aranges
method? -
do we move the
from_intervals
method to afrom_ranges
method? -
do we dump ranges using special mathematical notation?
See https://en.wikipedia.org/wiki/Interval_(mathematics)#Integer_intervals).
The notation
[a .. b]
is my favorite since it is used in Pascal.
Do we use 2 heaps (https://docs.python.org/3/library/heapq.html) for representing them?
Edited by Christophe Demko