adaptive
adaptive copied to clipboard
remove the first interval and use it in approximating_interval, do not use its children
(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 inivals
(Of course we should also remove all children ofival
fromlearner.ivals
wheneverival
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 wherea
andb
are withina
andb
of this interval. - Fourth, we should keep track of a separate set
learner.removed
(or better some other name likelearner.leaf_intervals
), where we add the ones we're removing.
We have a failing test right now that shows the behavior we want.