Changeset 14584 for branches/HeuristicLab.OSGAEvaluator/HeuristicLab.OSGAEvaluator/OSGAPredictionCountsAnalyzer.cs
- Timestamp:
- 01/18/17 15:40:34 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.OSGAEvaluator/HeuristicLab.OSGAEvaluator/OSGAPredictionCountsAnalyzer.cs
r14428 r14584 1 using System.Linq; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2017 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 using System.Linq; 2 23 using HeuristicLab.Analysis; 3 24 using HeuristicLab.Common; … … 44 65 45 66 ResultCollection predictionResults; 46 DataTable rejectedStatsTable, totalStatsTable, rejectedStatsPerGenerationTable , nonRejectedStatsPerGenerationTable;67 DataTable rejectedStatsTable, totalStatsTable, rejectedStatsPerGenerationTable; 47 68 if (!ResultCollection.ContainsKey("OS Prediction")) { 48 69 predictionResults = new ResultCollection(); … … 58 79 predictionResults.Add(new Result("Total Stats", totalStatsTable)); 59 80 rejectedStatsPerGenerationTable = new DataTable("Rejected Per Generation"); 60 nonRejectedStatsPerGenerationTable = new DataTable("Non Rejected Stats per Generation");61 81 foreach (var rowName in rejectedStats.RowNames) { 62 82 rejectedStatsPerGenerationTable.Rows.Add(new DataRow(rowName) { VisualProperties = { StartIndexZero = true, ChartType = DataRowVisualProperties.DataRowChartType.Line, LineWidth = 1 } }); 63 83 rejectedStatsPerGenerationTable.Rows[rowName].Values.Add(0d); 64 nonRejectedStatsPerGenerationTable.Rows.Add(new DataRow(rowName) { VisualProperties = { StartIndexZero = true, ChartType = DataRowVisualProperties.DataRowChartType.Line, LineWidth = 1 } });65 nonRejectedStatsPerGenerationTable.Rows[rowName].Values.Add(0d);66 84 } 67 85 predictionResults.Add(new Result("Rejected Stats Per Generation", rejectedStatsPerGenerationTable)); 68 predictionResults.Add(new Result("Non Rejected Stats Per Generation", nonRejectedStatsPerGenerationTable));69 86 ResultCollection.Add(new Result("OS Prediction", predictionResults)); 70 87 } else { … … 73 90 totalStatsTable = (DataTable)predictionResults["Total Stats"].Value; 74 91 rejectedStatsPerGenerationTable = (DataTable)predictionResults["Rejected Stats Per Generation"].Value; 75 nonRejectedStatsPerGenerationTable = (DataTable)predictionResults["Non Rejected Stats Per Generation"].Value;76 92 } 77 93 … … 88 104 var sum = row.Values.Sum(); 89 105 row.Values.Add(totalStats[i, 0] - sum); 90 row = nonRejectedStatsPerGenerationTable.Rows[rowName];91 sum = row.Values.Sum();92 row.Values.Add(totalStats[i, 1] - sum);93 106 ++i; 94 107 }
Note: See TracChangeset
for help on using the changeset viewer.