Boost logo

Boost :

Subject: Re: [boost] [Review] ITL review starts today, February 18th
From: Jeff Flinn (TriumphSprint2000_at_[hidden])
Date: 2010-02-22 15:39:36


Hartmut Kaiser wrote:
> Hi all,
>
> The formal review of the Interval Template Library (ITL) starts today,
> February 18th, 2010 and will end February 27th, 2010. ITL is being
developed by Joachim Faulhaber.
>
> ------------------------------------------------
>
> About the library:
>
> The Interval Template Library (ITL) is a library of interval
containers that
> facilitates computations on collections of intervals and associated
values.
...
Hmm, not much discussion yet. While this is not my review I'll make a
few comments.

I was able to port at least my necessary portions of split interval map
to CodeWarrior 9.4 and was successful in using it to generate a column
coverage graph of what is effectively the columns of possibly large
sparse matrices.

I would have expected the containers to be templated on an interval
type, negating the need for run-time determination of boundtype. With
the current design, a rather heavy interval is required with it's
boundtype data member. My domain type is a simple int, an index into a
row of a sparse matrix. Our in-house Interval class is always
right_open, so there is only the need for a begin and end value leading
to minimal memory usage. The current library design requires me to
convert between ITL intervals and my own application's intervals. I'd
have like to be able to provide a model of an interval concept that the
ITL container would use.

I wasn't able to find any description of the class invariants for
interval. For example in our own Interval class the upper/end value must
be greater than/equal to the lower/begin value which is a precondition
to the constructor taking a pair of domain values. We do provide a
static makeNormalized method to produce a proper interval when the order
of the domain arguments is unknown, which is not very often in our usage
so you don't pay that cost. In my case I hadn't the need for 'reversed'
intervals, but I could see that being required for some use cases. Does
ITL handle that?

Along the same lines I've found little need for the mutators. An
interval really only needs default and copy constructors, and one taking
the upper and lower values. All mutations merely construct a new
interval using calculated values and begin/end values from source intervals.

Jeff


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk