LeMonADE-project / LeMonADE

Library for Monte Carlo Simulation applying the Bond Fluctuation Model
Other
3 stars 11 forks source link

RandomNumberGenerators::seedAll from array or file #79

Closed mxmlnkn closed 7 years ago

mxmlnkn commented 7 years ago

A proposition for how to use seedAll with a file of seeds, e.g. created with head -c 1032 > seeds.dat. seedAll now also takes a file name or an std::vector or a simple pointer to an array, with the latter being the most unsafe variant which I only added for legacy. Also moves some includes from the header into the cpp. In general only includes which are needed directly in the header file should be there.

MartinWenge commented 7 years ago

Quite a lot new interfaces! This should make the rng class more flexible and powerful 👍

At the moment, I use almost exclusively the default seedAll() function, @mxmlnkn did you have a particular application for the new interfaces in mind?

mxmlnkn commented 7 years ago

@MartinWenge I needed this in order to get reproducible results with given fixed seeds, so that I can test some changes on the code I'm working on for consistency. Personally I only use the interface which directly reads the seeds from a file, but I guess there might be use cases where they aren't particularly in a file.