Exemplo n.º 1
0
 public void StandardSetup()
 {
     sparseSet  = new FasterSparseSet <float>(dictionarySize);
     dictionary = new FasterDictionary <uint, float>(dictionarySize);
     array      = new int[dictionarySize];
     array2     = new float[dictionarySize];
 }
Exemplo n.º 2
0
        public void GlobalSetupRandom()
        {
            sparseSet  = new FasterSparseSet <float>(dictionarySize);
            dictionary = new FasterDictionary <uint, float>(dictionarySize);
            array      = new int[dictionarySize];
            array2     = new float[dictionarySize];

            for (int i = 0; i < dictionarySize; i++)
            {
                dictionary[randomIndices[i]] = i;
            }
            for (int i = 0; i < dictionarySize; i++)
            {
                sparseSet.Set(randomIndices[i], i);
            }
            for (int i = 0; i < dictionarySize; i++)
            {
                array2[array[randomIndices[i]]] = i;
            }
        }