Module: GSL

Defined in:


Reasons for existence of this code:

It so happens that GSL's 2D interpolation methods are somehow swapping X and Y co-ordinates and returning a wrong result. This is a bug in GSL, and in order to make up for that, we swap the x and y points before passing them to GSL. The detect_gsl_interp2d_swapping_bug method tests the inter2d eval function to see if the bug exists so that in case a future GSL update fixes the bug, this Ruby wrapper will remain unaffected.

For testing whether the bug exists, the eval method is run and tested against what is known to be corrent output (ans_expected), and the @@swapped class variable is set to true if the result is not consistent with the expected output. If @swapped is true, the x and y values are internally swapped by the Ruby wrapper before passing them to GSL for processing.

Defined Under Namespace

Modules: Oper Classes: Interp2d, Object, Spline2d

Constant Summary collapse