This is the mail archive of the gsl-discuss@sourceware.cygnus.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: GSL random stuff


Sven,
  Sorry not to get back to you sooner.  I also got your follow-up
email, which I have included below for the benefit of the rest of
the gsl-discuss mailing list (which I hope you do not mind I am
cc'ing on this reply)

On Mon, 5 Apr 1999, Sven N. Thommesen wrote:

] 
] Dr. Theiler,
] 
] I have just become aware of the GSL math library. I'd like to make use of
] (at least parts of) it, but I have some questions.
] 
] First, by way of introduction: a while back I implemented a set of random
] generators and a few distributions for the Swarm simulation package
] <http://www.santafe.edu/projects/swarm>. I did not have the time then to
] implement all the distributions that I wished, and now I see that you have
] made my work a lot easier ...

I am somewhat familiar with Swarm; Chris Langton is a former colleage
and current neighbor.

] I should note that I seem to have implemented a few generators that you
] didn't, and you are more than welcome to use any that you find interesting.
] (Or, if you want, I can rework the ones you find interesting so as to fit
] into GSL. I'll have some free time later this spring.)

GSL's RNG's are meant to be inclusive; the more the merrier.

] 
] Now, to the questions:
] 
] a) how well have your generators and distributions been tested
] statistically? [My Swarm generators have been run through Diehard.]

I'm cc'ing this message to the gsl-discuss mailing list, which includes
Brian Gough, and I think he has run most of the generators through
Diehard.  The documention (I think) distinguishes the "simulation quality" 
from the quick and dirty, or legacy, generators. 

] b) do you plan on keeping GLS a single, static library? I would of course
] prefer a dynamically loaded library, and preferably one split into logical
] pieces (as in, the random stuff by itself ;-)

I too prefer the individual pieces -- in fact, my approach is often to
just snag the source code, and fit it into the conventions of the package
that is using it.  

As it stands, you don't have to build GSL as a single static library; for
instance, you can just build 'libgslrandom.a' 

I'm not an expert on dynamically loaded libraries, so I'll defer to
someone who know better than I.

] 
] c) there is mention on the discussion list of Redhat including GSL in the
] upcoming 6.0 -- do you happen to know if they will include a dynamic
] library or just a static one?

Mark, any insight?

] 
] d) Would there be any objection to my cribbing code from GSL and wrapping
] it into Objective-C objects (with full attribution, of course) ?

None at all.  It's GPL code, so there are the usual restrictions on
selling your code without also including or at least pointing to the GSL
source code.  

If you mean you want to take the source code and transmogrify it to fit
your purposes, as opposed to accessing the routines through the
existing API, that's fine.  It's always better if you can do it in a way
that permits you to easily incorporate upgrades/bugfixes to GSL and/or
in a way that can lead to your own improvements finding their way back
to GSL, but that really goes without saying.

] e) A possible bug report: in function gsl_rng_uniform_int(r,n), you say 
] 	unsigned long int offset = r->min;
] 	unsigned long int range = r->max - offset;
] Should not that last line be "range = r->max - offset + 1" ? 
] (Then you'd have to make a special case out of max==2^32-1, of course.)

Thanks.  We'll take a look at that.

regards,
jt

=========== and here is Sven's follow-up email

James,

In follow-up to my previous message, here's a pointer to a web page, part
of the Swarm documentation, which lists the random generators I
implemented in Swarm, and gives the references to where I found them. In
some cases I implemented more than one version of the given generator,
using different parameters; for example there are 9 different PMMLCG
generators (one of which is Park and Miller's "miminal standard".) Also
several of L'Ecuyer's generators, including two with "splitting
facilities".

<http://www.santafe.edu/projects/swarm/swarmdocs/refbook/swarm.random.sgml.a
ppendix.sect1.reference.html>

The results I got from running data from all the generators through
Diehard are available in the "Random Appendix" section of the Swarm
documentation: 

<http://www.santafe.edu/projects/swarm/swarmdocs/refbook/swarm.random.sgml.a
ppendix.sect1.adv-usage.html#AEN20220>

As I said, feel free to appropriate for GSL any generators from Swarm that
you find interesting. 

Cheers,
Sven Thommesen

---------------------------------------------
James Theiler                     jt@lanl.gov
MS-D436, NIS-2, LANL        tel: 505/665-5682
Los Alamos, NM 87545        fax: 505/665-4414
----- Space and Remote Sensing Sciences -----











Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]