Hi Tim, > a month ago I proposed an implementation of the Spearman rank > correlation coefficient ... > https://gist.github.com/1784199#file_spearman_v2.c > > ... Thus can I submit it to the GSL main trunk? > I've never done that before. Can someone indicate me what to do? > Should I request "developer write access" for instance?
>From reviewing the code at the github... Your gsl_stats_spearman_workspace (e.g.) should be passed into your gsl_stats_spearman method. You'll want to declare a struct-based workspace rather than allocate/deallocate many separate variables in your gsl_stats_spearman_alloc/gsl_stats_spearman_free. As an example, check out gsl_bspline_workspace from bspline/gsl_bspline.h which is allocated/deallocated by gsl_bspline_alloc/gsl_bspline_free. You'll want to add the allocation-failure error handling as in the bspline example. You gsl_stats_spearman_rank implementation should always be checking if calloc/realloc failed and handle that error appropriately Helper functions like "resolveTies" which should not be publicly visible should be declared static. That way they can only be called from within the same file. Finally, the Apache License 2.0 origin of the logic should be made more clear in the file. Just attributing the logic with "Source" seems insufficient-- I'd organize the file so everything below some point if the Apache-derived code and everything above that point is your GSL-ready GPL3 logic. Give a shout when you're ready and I'll take another look. I can help with getting the final logic into GSL's trunk. - Rhys
