Пример #1
0
    /// <summary>
    /// Sets the generator does not reset the generator the distribution is using to the new
    /// generator if only using a generator this is the only thing you need to call
    /// </summary>
    /// <param name="seed">Seed.</param>
    /// <param name="genx">Genx.</param>
    public void setGenerator(int seed, generators genx)
    {
        switch (genx)
        {
        case generators.MT19937:
            gen = new MT19937Generator(seed);
            break;

        case generators.ALF:
            gen = new ALFGenerator(seed);
            break;

        case generators.Standard:
            gen = new StandardGenerator(seed);
            break;

        case generators.XorShift:
            gen = new XorShift128Generator(seed);
            break;
        }
    }