Wed 23 Jul 2014 04:53:31 AM UTC, original submission:
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
Hardware: Toshiba stallite pro C850 (PSCBXA-010005)
CPU: Intel i5 processor 3210M (2.5 GHz - 3.1 GHz (Turbo, 2 Cores) 1333MHz FSB, 256 KB per core L2 cache, 3MB L3 cache)
Chipset: Intel HM76
Thank you all for the great help you provide.
All the best,
|