private MSSOutput(MSSInput input, StatisticMap Statistics, IMSShortcutSet Shortcuts)
 {
     this.input      = input;
     this.Statistics = Statistics;
     this.Shortcuts  = Shortcuts;
     RegisterLevelCountStatistics();
 }
Пример #2
0
        protected Algorithm(string name)
        {
            OptionsControl = null;
            Statistics     = new StatisticMap();

            Name = name ?? "Unknown";

            RegisterAllStatistics();
        }
Пример #3
0
        protected Output()
        {
            logStringBuilder = new ThreadSafeStringBuilder();
            Statistics       = new StatisticMap();
            LogBuffers       = new List <StringBuffer>();
            Logging          = true;

            RegisterStatistics();
        }
        private static void FillColumn(DataTable table, int column, StatisticMap statistics, Dictionary <string, DataRow> statToRow, List <string> currentlyTrackedStats)
        {
            var updatedStats = new List <string>();

            if (statistics != null)
            {
                //update the current stats
                var stats = statistics;

                //fill cells
                foreach (var stat in stats.ToList()) //cloning for thread safety
                {
                    if (!statToRow.ContainsKey(stat.Key))
                    {
                        var row = table.Rows.Add(stat.Key);
                        statToRow[stat.Key] = row;
                    }

                    if (!currentlyTrackedStats.Contains(stat.Key))
                    {
                        currentlyTrackedStats.Add(stat.Key);
                    }

                    statToRow[stat.Key][column] = stat.Value.Value;

                    updatedStats.Add(stat.Key);
                }
            }

            //removing run stats and, if necessary, empty rows
            if (currentlyTrackedStats.Count > updatedStats.Count)
            {
                currentlyTrackedStats
                .FindAll(stat => !updatedStats.Contains(stat))
                .ForEach(stat =>
                {
                    currentlyTrackedStats.Remove(stat);

                    var row     = statToRow[stat];
                    row[column] = null;

                    var columnCount = table.Columns.Count;
                    for (var col = 1; col < columnCount; col++)
                    {
                        if (row[col] != DBNull.Value)
                        {
                            return;
                        }
                    }

                    table.Rows.Remove(row);
                    statToRow.Remove(stat);
                });
            }
        }
Пример #5
0
 protected Input()
 {
     Statistics = new StatisticMap();
     Name       = "Input";
     RegisterAllStatistics();
 }
Пример #6
0
 public AlgorithmRun()
 {
     Statistics = new StatisticMap();
 }