diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-02-21 15:34:04 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-02-21 16:36:10 -0800 |
commit | 10ae00db3cf994dad1d784dfd7855c55c9153924 (patch) | |
tree | 33f4d4bf859a13bf114ed99cdb45939f8dbbce48 /desktop-widgets/subsurfacewebservices.cpp | |
parent | b71fc7ffb2d1a43cee859a9862d3f85303a5310a (diff) | |
download | subsurface-10ae00db3cf994dad1d784dfd7855c55c9153924.tar.gz |
pressure interpolation: incrementally update interpolation data
Instead of re-calculating all the interpolation data for each plot entry
(which means that we have a quadratic algorithm that walks over all the
plot-info points for each plot-info point), we can just update it
incrementally within any particular interpolation segment.
The previous cleanups made the code sane enough to understand, and makes
it trivial to see how you don't have to recalculate the full thing.
This gets rid of the O(n**2) algorithm, and it instead becomes O(n*m)
where 'n' is the number of plot entries, and 'm' is the number of gas
segments (which is usually a much smaller numer, typically "1").
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/subsurfacewebservices.cpp')
0 files changed, 0 insertions, 0 deletions