private void RegisterPathStatistics()
        {
            foreach (var target in input.Targets)
            {
                var targetIndex = target.Index;
                Statistics.Put("Path weight for target " + targetIndex, () =>
                {
                    if (!ShortcutPaths.ContainsKey(target))
                    {
                        return("");
                    }

                    return(ShortcutPaths[target].Weight);
                });

                Statistics.Put("Path size for target " + targetIndex, () =>
                {
                    if (!ShortcutPaths.ContainsKey(target) || ShortcutPaths[target].Points == null)
                    {
                        return("");
                    }

                    return(ShortcutPaths[target].Points.Count);
                });
            }
        }
Beispiel #2
0
        public void MaximizeError(Shortcut shortcut, double otherError)
        {
            if (!MaxErrors.ContainsKey(shortcut))
            {
                return;
            }

            var oldMinLevel = MaxErrors[shortcut];

            if (oldMinLevel < otherError)
            {
                MaxErrors[shortcut] = otherError;
            }
        }
Beispiel #3
0
        public void MaximizeLevel(Shortcut shortcut, int otherLevel)
        {
            if (!MinLevels.ContainsKey(shortcut))
            {
                return;
            }

            var oldMinLevel = MinLevels[shortcut];

            if (oldMinLevel < otherLevel)
            {
                LevelCounts[oldMinLevel]--;
                MinLevels[shortcut] = otherLevel;
                LevelCounts[otherLevel]++;
            }
        }