summaryrefslogtreecommitdiff
path: root/src/powermap.h
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2020-04-25 22:45:47 +0200
committerAndré Nusser <andre.nusser@googlemail.com>2020-04-25 22:46:10 +0200
commit8d22262afd0f91b49cb046d090b186c4305d470b (patch)
tree33977ef13d978f16b3b19ddab529145854255b4e /src/powermap.h
parent75be125fb0f50a8e4e766ca70f15b5822c0076e2 (diff)
Introduce Steffen monotone cubic splines.
Diffstat (limited to 'src/powermap.h')
-rw-r--r--src/powermap.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/powermap.h b/src/powermap.h
index 29a3c81..b942722 100644
--- a/src/powermap.h
+++ b/src/powermap.h
@@ -64,9 +64,13 @@ private:
// spline parameters (deterministically computed from the input parameters)
std::array<float, 5> m;
-
bool spline_needs_update;
+
void updateSpline();
+ std::vector<float> calcSlopes(Powers const& X, Powers const& P);
+ std::vector<float> calcSlopesFritschCarlson(Powers const& X, Powers const& P);
+ std::vector<float> calcSlopesSteffen(Powers const& X, Powers const& P);
+
Power clamp(Power in, Power min, Power max) const;
const Power eps = 1e-3;