|
Boost Users : |
Subject: Re: [Boost-users] [ICL] Specific interval_map
From: A G (heyji2_at_[hidden])
Date: 2012-10-01 06:06:09
2012/9/29 Joachim Faulhaber <afojgo_at_[hidden]>
>
> .
> The use case you are suggesting is probably beyond the idea of
> aggregating associated values on overlap. Moreover the value you
> intend to associate to intervals, their size, is already available via
> the icl::size function on intervals.
>
> I think the behavior that you intend can be obtained using an
> icl::split_interval_set in the following way:
>
> Hello Joachim,
Thank you for your feedback. I took a wrong example. Intervals represent
memory in my case, and with each interval, I have an aggregated object from
an ad-hoc class, which represents the memory value at the given "memory
interval". I thought I could simplify my example stating I need the size of
the interval, but it is a wrong simplification in my case.
Therefore each time I need to resize an interval, the memory value
corresponding to it must be updated (either cutting its lower or upper
part).
I understand that the split_interval_map is probably not the best container
for this, because I need something different from an simple aggregation on
overlap. You suggested working with split_interval_set() but then I would
need to customize the addition function of two overlapping interval. This
is probably not open in your library. Do you confirm, and if so do you also
confirm it is best for me to design my own container ?
BR,
AG.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net