bugGNU Scientific Library - Bugs: bug #42830, Bug in gsl_bspline_knot constructor


You are not allowed to post comments on this tracker with your current authentication level.

bug #42830: Bug in gsl_bspline_knot constructor

Submitter:  Foivos Diakogiannis <foivos>
Submitted:  Wed 23 Jul 2014 04:53:31 AM UTC
Category:  None Severity:  3 - Normal
Operating System:  Ubuntu 12.04 LTS Status:  None
Assigned to:  None Open/Closed:  Open
Release:  gsl 1.16

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,

Foivos Diakogiannis <foivos>
Group Member


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #31756:  bsplines_order_fix.png added by foivos (29KiB - image/png)
file #31757:  test_bspline_order.cpp added by foivos (1KiB - text/x-c++src)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by foivos (Submitted the item)
  • -email is unavailable- added by foivos

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-07-23 foivos Attached File- Added bsplines_order_fix.png, #31756
        Attached File- Added test_bspline_order.cpp, #31757
        Carbon-Copy- Added foivos

    Back to the top

    Powered by Savane 3.13-b921.
    Corresponding source code