Пример #1
0
        private void pruneInconsequentialDiffs()
        {
            // Go back and prune inconsequential diffs. "Inconsequential" means, here, only represented by one
            // data point, so possibly unreliable
            var it1 = averageDiffs.entrySet().ToList();

            for (int i = 0; i < it1.Count; i++)
            {
                FastByIDMap <RunningAverage> map = it1[i].Value;

                var it2 = map.entrySet().ToList();
                for (int j = 0; j < it2.Count; j++)
                {
                    RunningAverage average = it2[j].Value;
                    if (average.getCount() <= 1)
                    {
                        map.remove(it2[j].Key);
                    }
                }
                if (map.isEmpty())
                {
                    averageDiffs.remove(it1[i].Key);
                }
                else
                {
                    map.rehash();
                }
            }
            averageDiffs.rehash();
        }