[BioLib-dev] Need to link another library gsl

Pjotr Prins pjotr.public14 at thebird.nl
Mon Aug 3 15:45:37 UTC 2009


On Mon, Aug 03, 2009 at 10:56:52AM -0400, Xin Shuai wrote:
> I've tried to add the related  .c source files in gsl library and compile
> them. However, the difficulty is little beyond my expectation
> Actually, only four functions are needed for libsequence:
> 
> gsl_rng_uniform(__r)
> 
> gsl_ran_flat(__r,a,b)
> 
> gsl_ran_exponential(__r,mean)
> 
> gsl_ran_poisson(__r,mean)

Funny. They are all random number generators, which are also in BOOST
and Rlib. How about replacing these functions in libsequence with
their Boost counterpart? Since we have Boost already. See, for example

  http://www.boost.org/doc/libs/1_35_0/libs/math/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/poisson_dist.html

would that be hard? I notice libsequence has a single wrapper
Sequence/RNG/gsl_rng_wrappers.hpp, which includes these. The other
uses are all example files.

How about creating Sequence/RNG/boost_rng_wrappers.hpp which gets
included when USE_BOOST is defined?

That would be a nice contribution for the libsequence project.

If that fails I can pull the GSL source tree into biolib. I have half
a mind to do that anyway - it is not so large.

All possible ;-)

Pj.




More information about the BioLib-dev mailing list