ANN: pyicl, a python interval container package based on boost.icl

John Reid johnbaronreid at googlemail.com
Mon May 21 10:50:52 CEST 2012


pyicl is a python package that exposes the functionality of boost.icl to
python using boost.python.

Documentation: http://packages.python.org/PyICL/
PyPi page: http://pypi.python.org/pypi/PyICL/

boost.icl is a general purpose interval container library written in
C++. Its author, Joachim Faulhaber, describes it thus:

"Intervals are almost ubiquitous in software development. Yet they are
very easily coded into user defined classes by a pair of numbers so they
are only implicitly used most of the time. The meaning of an interval is
simple. They represent all the elements between their lower and upper
bound and thus a set. But unlike sets, intervals usually can not be
added to a single new interval. If you want to add intervals to a
collection of intervals that does still represent a set, you arrive at
the idea of interval_sets provided by this library.

Interval containers of the ICL have been developed initially at Cortex
Software GmbH to solve problems related to date and time interval
computations in the context of a Hospital Information System. Time
intervals with associated values like amount of invoice or set of
therapies had to be manipulated in statistics, billing programs and
therapy scheduling programs. So the ICL emerged out of those industrial
use cases. It extracts generic code that helps to solve common problems
from the date and time problem domain and can be beneficial in other
fields as well.

One of the most advantageous aspects of interval containers is their
very compact representation of sets and maps. Working with sets and maps
of elements can be very inefficient, if in a given problem domain,
elements are typically occurring in contiguous chunks. Besides a compact
representation of associative containers, that can reduce the cost of
space and time drastically, the ICL comes with a universal mechanism of
aggregation, that allows to combine associated values in meaningful ways
when intervals overlap on insertion."

Regards,
John.


More information about the Python-announce-list mailing list