Re: [Help-gsl] change in gsl_multifit_linear_svd

2016-10-05 Thread Timothée Flutre
Thanks Patrick!
Tim

2016-09-30 18:00 GMT+02:00 <help-gsl-requ...@gnu.org>:

> Message: 1
> Date: Fri, 30 Sep 2016 11:48:34 +0200
> From: Patrick Alken <al...@colorado.edu>
> To: <help-gsl@gnu.org>
> Subject: Re: [Help-gsl] change in gsl_multifit_linear_svd
> Message-ID: <70d1859a-faee-2a6f-70d3-bb71be3d3...@colorado.edu>
> Content-Type: text/plain; charset="utf-8"
>
> Ok I've added the function
>
> gsl_multifit_linear_rank
>
> which now returns the effective rank of the matrix. It is in the git
> repository
>
> Patrick
>
> On 09/29/2016 04:02 PM, Timoth?e Flutre wrote:
> > Thanks for your answers!
> >
> > Patrick, indeed, after looking at the code, the difference arose between
> > versions 1.16 and 2.0. However, I can't use gsl_multifit_linear because I
> > also need the rank to compute the unbiased estimate of the error
> variance,
> > as well as the p value.
> > The rank was returned before by gsl_multifit_linear_svd, but not anymore.
> > By looking at the current code, I see that the rank is computed inside
> > multifit_linear_solve which is not available via the API.
> >
> > Is there a way to solve this without changing the API again?
> >
> > Tim
> >
> > 2016-09-22 18:00 GMT+02:00 <help-gsl-requ...@gnu.org>:
> >
> >> Send Help-gsl mailing list submissions to
> >> help-gsl@gnu.org
> >>
> >> To subscribe or unsubscribe via the World Wide Web, visit
> >> https://lists.gnu.org/mailman/listinfo/help-gsl
> >> or, via email, send a message with subject or body 'help' to
> >> help-gsl-requ...@gnu.org
> >>
> >> You can reach the person managing the list at
> >> help-gsl-ow...@gnu.org
> >>
> >> When replying, please edit your Subject line so it is more specific
> >> than "Re: Contents of Help-gsl digest..."
> >>
> >>
> >> Today's Topics:
> >>
> >>1. change in gsl_multifit_linear_svd (Timoth?e Flutre)
> >>2. Re: change in gsl_multifit_linear_svd (Patrick Alken)
> >>3. Re: change in gsl_multifit_linear_svd (Mohammad Akhlaghi)
> >>
> >>
> >> --
> >>
> >> Message: 1
> >> Date: Wed, 21 Sep 2016 21:10:57 +0200
> >> From: Timoth?e Flutre <timflu...@gmail.com>
> >> To: help-gsl@gnu.org
> >> Subject: [Help-gsl] change in gsl_multifit_linear_svd
> >> Message-ID:
> >> 

Re: [Help-gsl] change in gsl_multifit_linear_svd

2016-09-29 Thread Timothée Flutre
Thanks for your answers!

Patrick, indeed, after looking at the code, the difference arose between
versions 1.16 and 2.0. However, I can't use gsl_multifit_linear because I
also need the rank to compute the unbiased estimate of the error variance,
as well as the p value.
The rank was returned before by gsl_multifit_linear_svd, but not anymore.
By looking at the current code, I see that the rank is computed inside
multifit_linear_solve which is not available via the API.

Is there a way to solve this without changing the API again?

Tim

2016-09-22 18:00 GMT+02:00 :

> Send Help-gsl mailing list submissions to
> help-gsl@gnu.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.gnu.org/mailman/listinfo/help-gsl
> or, via email, send a message with subject or body 'help' to
> help-gsl-requ...@gnu.org
>
> You can reach the person managing the list at
> help-gsl-ow...@gnu.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Help-gsl digest..."
>
>
> Today's Topics:
>
>1. change in gsl_multifit_linear_svd (Timoth?e Flutre)
>2. Re: change in gsl_multifit_linear_svd (Patrick Alken)
>3. Re: change in gsl_multifit_linear_svd (Mohammad Akhlaghi)
>
>
> --
>
> Message: 1
> Date: Wed, 21 Sep 2016 21:10:57 +0200
> From: Timoth?e Flutre 
> To: help-gsl@gnu.org
> Subject: [Help-gsl] change in gsl_multifit_linear_svd
> Message-ID:
> 

Re: [Help-gsl] change in gsl_multifit_linear_svd

2016-09-22 Thread Mohammad Akhlaghi

On 09/21/2016 09:10 PM, Timothée Flutre wrote:


Moreover, does someone know how I can use conditionals with the Autotools
(via ./configure) so that, if the user has GSL <= 1.16, the compiled code
uses gsl_multifit_linear_svd whereas if the user has GSL >= 2.0 the
compiled code uses gsl_multifit_linear?


Once installed, GSL also installs an executable script called 
"gsl-config". If you run it with the "--version" option, this script 
will print the installed version of GSL:


$ gsl-config --version

You can use the output of this command, along with "AX_COMPARE_VERSION" 
(from the GNU Autoconf Archives) to check for the version. The link 
bellow shows how we do it in GNU Astronomy Utilities when we need to 
check the version of Ghostscript:


http://git.savannah.gnu.org/cgit/gnuastro.git/tree/configure.ac
(See the part that starts with the "Check Ghostscript:" comment)

You don't be needing the check on existance like our Ghostscript check, 
since I assume you will be using `AC_SEARCH_LIBS' for GSL's existance. 
You just need the indented part after `AC_MSG_CHECKING(Ghostscript 
version)'.


You can then pass the check's result into `config.h' and use the 
information in your programming to decide which function to use.


Cheers,
Mohammad



Re: [Help-gsl] change in gsl_multifit_linear_svd

2016-09-21 Thread Patrick Alken
The linear least squares code was rewritten (I think prior to 2.0) so
its possible that the svd routine changed, but I don't remember exactly
what the change was! If there was an API change it should have been done
prior to 2.0 (which was the reason for jumping to 2.0 instead of 1.17).
Sorry for the headache you're having now - the behavior of
gsl_multifit_linear should be the same for both GSL versions - can you
just use that instead?

On 09/21/2016 08:10 PM, Timothée Flutre wrote:
> Hello,
>
> did gsl_multifit_linear_svd change at some point after GSL 1.16? I couldn't
> see any mention of it in the NEWS file, but a user reported to me that my
> code doesn't compile anymore with GSL 2.1.
> Could someone add this somewhere in the NEWS file?
>
> Moreover, does someone know how I can use conditionals with the Autotools
> (via ./configure) so that, if the user has GSL <= 1.16, the compiled code
> uses gsl_multifit_linear_svd whereas if the user has GSL >= 2.0 the
> compiled code uses gsl_multifit_linear?
>
> Best,
> Tim