On the subject of adaptive trapezoidal subdivision (see this and this), I need to solve a problem where evaluating f(x)
takes a lot of time, so I need to do it the least number of times possible.
Searching on SO I found this answer: https://stackoverflow.com/a/29837372/261010
Rather than considering the error in each subinterval separately, more advanced codes compute the total error over all the subintervals and refine until the total error is below the desired threshold. Subintervals are chosen for refinement according to their contribution to the total error, with larger errors being refined first. Typically a priority queue is used to quickly chose the subinterval for refinement.
What does this mean exactly? How does the priority queue help in this scenario? How many subintervals can be considered "larger"?