Boost logo

Boost :

From: Chris Hamilton (chamilton_at_[hidden])
Date: 2007-12-21 09:21:07


Alec Ross wrote:
> In message <476A7273.2000900_at_[hidden]>, Chris Hamilton
> <chamilton_at_[hidden]> writes
>> In a recent project I've been working on, we had need for something that
>> I'm calling (for lack of a better, more inspired name ;) an 'indexed'
>> multi array. Essentially, we wanted something like a boost multi_array
>> but that also allowed indexing along each dimension using some kind of
>> indexing function.
>
> This looks interesting to me.
>
>> For example, along one dimension the indexing
>> function may except a string as input and use a map to return an integer
>> index, while along some other dimension the real line may be cut into
>> non-overlapping intervals and a double value is looked up returning the
>> index of the interval it belongs to.
>>
>
> And this too, in its own right. How do you deal with the issue of
> limited precision in doubles? E.g. a value that is a corner case for
> just being in range for one index, or possibly another if these ranges
> are meant to have no 'gap' (e.g. [d1, d2), [d2, d3))? Or possibly the
> value used is just in or out of a range, but the relevant epsilon could
> take it either way?

That's something that I didn't address whatsoever at this point.
However, it would always be possible to add some sort of 'epsilon' logic
to the 'Intervals' indexer (as I've called it currently). I'm not sure
there's a generic appropriate behaviour and I imagine it's very likely
application specific.

Chris


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