The current code for plotting mean integrals (ipet/misc/integrals.py) uses a fixed number of equidistant points to compute the average primal and dual gap as a function of time. However, one can do better by
collecting all the histories
storing them in a priority queue sorted by their next point in time when a primal (dual) bound changes
in each step, pop the next smallest point in time history from the queue, and append to the mean integral the new point in time, and the marginal change of the mean function
In this way, one would obtain an "exact" plot of the primal and dual bound histories that is arguably faster than the current method.
The current code for plotting mean integrals (ipet/misc/integrals.py) uses a fixed number of equidistant points to compute the average primal and dual gap as a function of time. However, one can do better by
In this way, one would obtain an "exact" plot of the primal and dual bound histories that is arguably faster than the current method.