Esempio n. 1
0
        public DistanceLookup(int cacheSize, uint[][] distances)
        {
            CacheSize = cacheSize;
#if PoESkillTree_ParrellelDistanceTest
            //Convert Array into Dictionary
            _distancesV2 = new IndexedDictionary <int, IndexedDictionary <int, uint> >();
            for (int XIndex = 0; XIndex < distances.Length; ++XIndex)
            {
                _distancesV2.Add(XIndex, new IndexedDictionary <int, uint>());
                for (int YIndex = 0; YIndex < distances[XIndex].Length; ++YIndex)
                {
                    _distancesV2[XIndex].Add(YIndex, _distancesV2[XIndex][YIndex]);
                }
            }
#endif
#if PoESkillTree_LinkDistancesByID
            //Convert Array into Dictionary
            _distances = new IndexedDictionary <int, IndexedDictionary <int, uint> >();
            for (int XIndex = 0; XIndex < distances.Length; ++XIndex)
            {
                _distances.Add(XIndex, new IndexedDictionary <int, uint>());
                for (int YIndex = 0; YIndex < distances[XIndex].Length; ++YIndex)
                {
                    _distances[XIndex].Add(YIndex, distances[XIndex][YIndex]);
                }
            }
#else
            _distances = distances;
#endif
        }
Esempio n. 2
0
 public DistanceLookup(int cacheSize, MCollections.IndexedDictionary <int, MCollections.IndexedDictionary <int, uint> > distances)
 {
     CacheSize  = cacheSize;
     _distances = distances;
 }