help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gsl] Possible bug on gsl_bspline_knot constructor


From: Foivos Diakogiannis
Subject: [Help-gsl] Possible bug on gsl_bspline_knot constructor
Date: Tue, 22 Jul 2014 22:12:16 +0800

Dear all,

I found the following problem which I think is a bug on the construction of
B-spline basis from non uniform breakpts

The constructor:

gsl_bspline_knot(gsl_vector * breakpts, gsl_bspline_workspace *bw)

does not  *always* check correctly for increasing values in the supplied
break points vector breakpts. Specifically (sometimes) it runs with no
warning, and gives values for B-spline basis that are inconsistent (e.g.
negative values for the basis functions B_i(x)).

I  attach:
a) A plot of the calculated B-spline basis B_i(x) that were created for a
knot vector with non increasing values.
b) A program that demonstrates this. Specifically, I have two choices of
breakpoints, one that the program compiles and runs and produces
inconsistent results, and another that the program exits on run time,
complaining for non increasing order of knot vector.

GSL version 1.16
Operating system: Ubuntu 12.04 LTS
Compiler version: g++ 4.7.3
File compiled with command:
g++ -std=c++11 test_bspline_order.cpp -o test_bspline_order.xxx -lgsl
-lgslcblas

Thank you all for the great help you provide.

All the best,
Foivos

Attachment: bsplines_order_fix.png
Description: PNG image

Attachment: test_bspline_order.cpp
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]