On 2008-06-27 22:56+0200 Werner Smekal wrote: > Hi Alan, > >> We need a volunteer to step forward to change example 21 in C so that it >> uses a simple random number generator that is internal to the example >> (perhaps something extremely simple but reasonably effective if you pick a >> "good" seed such as the middle square method described at >> http://en.wikipedia.org/wiki/Middle-square_method) and also so that >> execution times are not made part of PLplot labels. Once these changes >> were >> propagated to the rest of the front ends, this should hopefully make >> example >> 21 results uniform for all front-ends. > > Coincidently, I was thinking about a RNG provided by the PLplot library. If > nobody uses it except our example 21, no problem, since the code of RNGs is > rather short, so no harm done here, and maybe some users find it useful > though. A very good one (passed the diehard test), although maybe not good > enough for encryption (don't think that will be a problem :), is the Mersenne > Twister RNG > > http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html > > There is a C implementation available and the code is completely free. We > could write a PLplot interface to this RNG, and then make the changes to all > bindings. I volunteer to do that (that is the RNG interface, not all changes > to the bindings), but only in two weeks, since I'm away for one week now.
Since it appears you can implement this internally (i.e., no additional external libraries are involved) I encourage you to go ahead two weeks from now. From Wikipedia, the Mersenne Twister RNG is a better choice than the historical but rather flawed middle-square method that I mentioned. Also, your idea of putting a RNG within the PLplot library rather than example 21 is a good one. I have required RNG's for past plotting needs, I am sure many of our users have similar needs. Furthermore, the interactive example 17 could use a library RNG as well as example 21. Finally, it means we only have to implement a binding interface to the C version of the RNG for each of our bindings. That is actually much simpler than implementing the same RNG in many different languages for example 21 (and 17). Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel