I have a BTreeMap<f64,_> and want to leave numbers x where low < x < high.
However split_off(k) cannot control k being inclusive or exclusive.
This is a temporary solution with eps:
// delete all numbers >= high
let _ = map.split_off(high);
// want to delete all numbers <= low
map = map.split_off(low+1e-8);
A correct approach is to delete elements one by one, which I think can take O(n lg n).
Is there a way to use map.range((Excluded(&low), Excluded(&high))) and delete the range in O(lg n)? It looks like I need map.erase(range) or map.split_off_after(k).