patchGNU Octave - Patches: patch #9432, [octave forge] (gsl) Add function...

 
 

patch #9432: [octave forge] (gsl) Add function gsl_ran_landau_pdf

Submitted by:  Mathieu Trocmé <mtrocme>
Submitted on:  Wed 09 Aug 2017 08:47:51 AM UTC  
 
Category:  Forge : other Priority:  5 - Normal
Status:  Need Info Privacy:  Public
Assigned to:  None Open/Closed:  Open

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 07 Mar 2019 07:05:15 AM UTC, comment #3: 

Well, I'm not going to do it any time soon, but I think this should be left open since this is a legitimate feature request.

Perhaps a more general feature request would be to "Add pdf functions gsl_ran_*_pdf".

https://www.gnu.org/software/gsl/doc/html/randist.html

Julien Bect <jbect>
Thu 07 Mar 2019 12:34:43 AM UTC, comment #2: 

@jbect There's been no update from the author of this patch in quite a while, should we close this as incomplete or are you going to try to finish it yourself?

Mike Miller <mtmiller>
Project Administrator
Fri 18 Aug 2017 08:04:54 AM UTC, comment #1: 

The problem is easy to see if you build step by step.

First, if you just try to bootstrap with your patch:

cd src
./bootstrap

you get the following error:

/bin/sed: can't read D_DD.template.cc: No such file or directory

The proper template to use would have been D_D since the function you're interested in takes one double input and returns one double output.

If I simply fix that, I get another (more severe) problem at the make step. 

./bootstrap && ./configure && make

fails with:

/usr/bin/mkoctfile  gsl_sf.cc -lgsl
gsl_sf.cc: In function ‘octave_value_list Fgsl_sf_ran_landau_pdf(const octave_value_list&, int)’:
gsl_sf.cc:34276:52: error: ‘gsl_ran_landau_pdf’ was not declared in this scope
           gsl_ran_landau_pdf (arg1_data[i], &result);
                                                    ^
gsl_sf.cc:34290:52: error: ‘gsl_ran_landau_pdf’ was not declared in this scope
           gsl_ran_landau_pdf (arg1_data[i], &result);
                                                    ^
Makefile:29 : la recette pour la cible « gsl_sf.oct » a échouée
make: *** [gsl_sf.oct] Erreur 1

This is because all the templates that are currently available expect the signature of the gsl_sf_*_e functions, i.e., an int return type for the error code and a final gsl_sf_result argument for the double return value.

If you want to add gsl_ran_landau_pdf to the gsl package, you must either write a new kind of template, or wrap the gsl_ran_landau_pdf function inside an gsl_ran_landau_pdf_e function to make it look like the others.

Julien Bect <jbect>
Wed 09 Aug 2017 08:47:51 AM UTC, original submission:  

Hi there,

As I understood it, any gsl functions can be added to Octave through the octave-gsl wrapper
https://sourceforge.net/p/octave/gsl/ci/1.0.8/tree/src/README

Here's the unsuccessful attempt I made
http://octave.1599824.n4.nabble.com/gsl-ran-landau-pdf-in-octave-gsl-td4684319.html
And attached are the corresponding changes.

I feel I'm just missing something...

Thanks for your help,
Mathieu

Mathieu Trocmé <mtrocme>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #41458:  buildgsl_sf.sh.diff added by mtrocme (1KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by siko1056 (Updated the item)
  • -email is unavailable- added by jbect (Posted a comment)
  • -email is unavailable- added by mtrocme (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-03-07 mtmiller Summary[octave-forge] (gsl) Add function gsl_ran_landau_pdf => [octave forge] (gsl) Add function gsl_ran_landau_pdf
    2018-01-10 siko1056 StatusNone => Need Info
        SummaryHow to add new gsl functions to octave? => [octave-forge] (gsl) Add function gsl_ran_landau_pdf
    2017-08-09 mtrocme Attached File- => Added buildgsl_sf.sh.diff, #41458

    Back to the top


    Powered by Savane 3.5