adaptive icon indicating copy to clipboard operation
adaptive copied to clipboard

remove the first interval and use it in approximating_interval, do not use its children

Open basnijholt opened this issue 5 years ago • 0 comments

(original issue on GitLab)

opened by Bas Nijholt (@basnijholt) at 2018-01-05T10:55:36.350Z

Currently, when an interval is removed because the numerical precision of the integral (or error) cannot be improved any more, and it has children, learner.approximating_intervals will contain the children of that interval when al points are done. Instead, we want the parent and not use the contributions of the children.

@anton-akhmerov had an idea of how to do this (from chat):

  • First of all, before triggering complete_process we should check whether the interval is in ivals (Of course we should also remove all children of ival from learner.ivals whenever ival is removed.)
  • Second, we should remove the reference from children of the removed interval to their parent.
  • Third we should go all the way up the tree from the interval we're removing and remove from done_leaves the intervals contained within the one we're removing (so the once where a and b are within a and b of this interval.
  • Fourth, we should keep track of a separate set learner.removed (or better some other name like learner.leaf_intervals), where we add the ones we're removing.

We have a failing test right now that shows the behavior we want.

basnijholt avatar Dec 19 '18 16:12 basnijholt