예제 #1
0
        private ValuesByUnderlying InitializeIntLookup()
        {
            var vals = new IntIntMap(values.Count + 1, 0.55f);

            for (int i = 0; i < values.Count; ++i)
            {
                var value = values[i].IntValue();
                if (vals.Get(value) == IntIntMap.NoValue)
                {
                    vals.Put(value, i);
                }
            }

            return(new ValuesByUnderlying {
                IntMap = vals
            });
        }