예제 #1
0
        public void Find(SearchQuery <V> query)
        {
            KeyedSearchQuery <K, V> keyedQuery = (KeyedSearchQuery <K, V>)query;
            int index = _function.Hash(keyedQuery.SearchKey());

            _storage.Find(index, keyedQuery);
        }
예제 #2
0
 public override void Find(int index, KeyedSearchQuery <K, V> keyedQuery)
 {
     for (int i = 0; i < _array.Length; i++)
     {
         int realIndex = (index + i * _mainFunction.Hash(keyedQuery.SearchKey())) % _array.Length;
         if (_array[realIndex] == null)
         {
             keyedQuery.Count();
             return;
         }
         if (keyedQuery.Check(_array[realIndex]) == 0 && !_deleted[realIndex])
         {
             return;
         }
     }
 }