
2011/3/1 John Reid <j.reid@mail.cryst.bbk.ac.uk>:
On 28/02/11 19:23, Joachim Faulhaber wrote:
Ok, lookup of elements via 'find' or check for containedness via 'contains' can be implemented without too much difficulties. For statically bounded intervals of continuous domain types I am currently adding a function icl::unit_closure. Unit closure is the smallest interval for a value x that can be constructed from x using incrementation or decrementation. For numeric domain types unit_closure(x) always has a length of 1. For discrete domain_types unit_closure yields the same intervals that function icl::singleton currently computes.
Using function icl::unit_closure I am able to implement icl::find and icl::contains and icl::intersects on element types.
I will probably commit the code and related tests to the trunk today.
Fantastic. Thanks,
Sure :) Last night my commit of the changes was a little careless. So I introduced compilation problems for gcc. I fixed them right now and updated trunk. The code should work now. Enjoy, Joachim -- Interval Container Library [Boost.Icl] http://www.joachim-faulhaber.de