[Top][All Lists]

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

[Bug-gsl] Catch-22 with interpolation objects

From: Hendrik Weisser
Subject: [Bug-gsl] Catch-22 with interpolation objects
Date: Sat, 15 Jan 2011 01:52:10 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv: Gecko/20101207 Thunderbird/3.1.7


For the creation of interpolation objects, a certain number of data points (varies depending on the interpolation type) is needed. The function "gsl_interp_min_size" can be used to find this number.

However, "gsl_interp_min_size" takes an interpolation object as argument, which can't be created with too few points. Thus, you can't use the function to check whether you have enough points to create the object, which kind of defeats its purpose.

I propose that "gsl_interp_min_size" be changed to the following:

unsigned int gsl_interp_min_size(const gsl_interp_type* T)
        return T->min_size;

It would be called with an interpolation type ("gsl_interp_linear" etc., same as "gsl_interp_alloc"), not an object, to get minimum size required for this type.

Best regards


reply via email to

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