Ejemplo n.º 1
0
    private void SampleShuffle(ref UnityRandom _urand)
    {
        ShuffleBagCollection <float> thebag = _urand.ShuffleBag(shufflebag);

        for (int m = 0; m < samplig_size; m++)
        {
            randomList.Add(thebag.Next());
        }
        randomList.Sort();
    }
Ejemplo n.º 2
0
    // Really no time to make it better (FIXME)
    private void SampleWShuffle(ref UnityRandom _urand)
    {
        wshufflebag = new Dictionary <float, int>();
        // fill the wshufflebag
        wshufflebag[1]  = 5;
        wshufflebag[2]  = 10;
        wshufflebag[3]  = 10;
        wshufflebag[4]  = 25;
        wshufflebag[5]  = 25;
        wshufflebag[6]  = 10;
        wshufflebag[7]  = 5;
        wshufflebag[8]  = 5;
        wshufflebag[9]  = 3;
        wshufflebag[10] = 2;

        ShuffleBagCollection <float> thebag = _urand.ShuffleBag(wshufflebag);

        for (int m = 0; m < samplig_size; m++)
        {
            randomList.Add(thebag.Next());
        }
        randomList.Sort();
    }