You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
map: {([0,2)->0)([2,4)->20)([4,6)->40)([6,8)->60)([8,10)->80)}
after remove: {([0,2)->0)([2,3)->20)([7,8)->60)([8,10)->80)}
This behavior is very surprising, because I would have expected that an inter_sect (in our case dummy_) f-tor would be used for the intersecting ranges [2,4) and [6,8). In my own use case, the correct output after removal should be
after remove: {([0,2)->0)([2,3)->0)([7,8)->0)([8,10)->80)}
But I see no way to achieve this with the current implementation of erase(interval).
The text was updated successfully, but these errors were encountered:
Hi Justinas,
subtracting an interval from an Interval_map using the -= operator is effectively erasing the all content form the interval_map within the interval test_range.
If you'd like intersection to be propagated to values of the map, you need to combine two interval_maps that must have the same codomain type being a model of concept Set.
You may take a look at example user groups for this kind of operations.
Best regards,
Joachim
Consider a test program
The output of this program is going to be
This behavior is very surprising, because I would have expected that an
inter_sect
(in our casedummy_
) f-tor would be used for the intersecting ranges [2,4) and [6,8). In my own use case, the correct output after removal should beafter remove: {([0,2)->0)([2,3)->
0)([7,8)->
0)([8,10)->80)}
But I see no way to achieve this with the current implementation of
erase(interval)
.The text was updated successfully, but these errors were encountered: