예제 #1
0
        public override int Add(BDictionary <int, int> blist, int key, int preferredIndex)
        {
            int i     = blist.FindLowerBound(key);
            int value = _nextValue++;

            blist.Add(key, value);
            return(i);
        }
예제 #2
0
        public override int AddToBoth(BDictionary <int, int> blist, List <IntPair> list, int key, int preferredIndex)
        {
            int i     = blist.FindLowerBound(key);
            int value = _nextValue++;

            blist.Add(key, value);
            list.Insert(i, new KeyValuePair <int, int>(key, value));
            return(i);
        }