diff options
Diffstat (limited to 'third_party/skcms/src/GaussNewton.h')
-rw-r--r-- | third_party/skcms/src/GaussNewton.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/third_party/skcms/src/GaussNewton.h b/third_party/skcms/src/GaussNewton.h index 16ad80bcf7..2cabbd0075 100644 --- a/third_party/skcms/src/GaussNewton.h +++ b/third_party/skcms/src/GaussNewton.h @@ -9,7 +9,7 @@ #include <stdbool.h> -// One Gauss-Newton step, tuning up to 4 parameters P to minimize [ t(x,ctx) - f(x,P) ]^2. +// One Gauss-Newton step, tuning up to 3 parameters P to minimize [ t(x,ctx) - f(x,P) ]^2. // // t: target function of x to approximate // t_ctx: any context needed for t, passed blindly into calls to t() @@ -18,16 +18,16 @@ // P: in-out, both your initial guess for parameters of f(), and our updated values // x0,x1,N: N x-values to test in [x0,x1] (both inclusive) with even spacing // -// If you have fewer than 4 parameters, set the unused P to zero, don't touch their dfdP. +// If you have fewer than 3 parameters, set the unused P to zero, don't touch their dfdP. // // Returns true and updates P on success, or returns false on failure. bool skcms_gauss_newton_step(float (* t)(float x, const void*), const void* t_ctx, - float (* f)(float x, const void*, const float P[4]), + float (* f)(float x, const void*, const float P[3]), const void* f_ctx, - void (*grad_f)(float x, const void*, const float P[4], float dfdP[4]), + void (*grad_f)(float x, const void*, const float P[3], float dfdP[3]), const void* g_ctx, - float P[4], + float P[3], float x0, float x1, int N); // A target function for skcms_Curve, passed as ctx. |