a few questions about discrete rng

Brian Gough bjg@network-theory.co.uk
Tue Jul 9 15:49:00 GMT 2002


Rodney Sparapani writes:
 > Brian:
 >  Apparently, I didn't understand the standards documentation with
 > respect to size_t.  But, it's too bad about gsl_vector.  I think
 > this decision should be reconsidered.  Also, I remember reading
 > that there have been some developments with respect to vectors in
 > C99.  Might this not also be a good reason to re-think the design?

Nope ;-)

 > It is alot easier to pass one parameter than 2 since you can easily
 > get them backwards.

gsl's vectors use a stride, which adds unnecessary overhead to array
based functions.

 >  But, back to discrete with size_t and without gsl_vector.  I
 > thought that it would be better to streamline it a bit and make it
 > look more like the other rng's.  I'm attaching an example of that
 > which also contains a prototype for a multinomial randist.
 > Comments are welcome and please feel free to use this in GSL.

Is there any algorithm better than O(n)?



More information about the Gsl-discuss mailing list