A class called mcsLibre facilites sampling during simulation. Begin by including the necessary header file:
#include "mcsLibre.h"
Then declare an object of type mcsLibre:
mcsLibre samplesource;
This initializes MCS-libre using the default 100 random number seeds.
To use an alternative set of seeds stored in a file, use
mcsLibre samplesource(filename);
For example, in the extra_seeds directory there are lists of seeds that can be used:
mcsLibre samplesource(``~/MCS-libre/extra_seeds/ten_seeds'');
These lists contain large double precision numbers. They are listed one per line (each corresponding to a stream) and there is no limit to the amount of streams that can be used. Loading one's own seeds allows greater control over simulation. However, in many cases, the default seeds should be sufficient, assuming 100 or less streams are being used.
The current release enables sampling from normal and uniform distributions. Future releases will contain additional distributions.