Ejemplo n.º 1
0
            public int Add(T *key)
            {
                var array = this.array;

                if (count >= loadSize)
                {
                    array = array.ExpandBuckets();
                    for (int i = 0; i < count; i++)
                    {
                        Put(array, array.List + i, i);
                    }
                    loadSize = (int)(array.BucketsLength * LoadFactor);
                }
                if (count >= array.ListLength)
                {
                    array = array.ExpandList();
                }
                array.List[count] = *key;
                Put(array, key, count);
                this.array = array;
                return(count++);
            }