Changeset 13944
- Timestamp:
- 06/28/16 23:26:41 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tracking/Analyzers/SymbolicDataAnalysisFragmentLengthAnalyzer.cs
r13747 r13944 111 111 } 112 112 } 113 var averageFragmentLength = (crossoverFragmentLengthDistribution.Average() + mutationFragmentLengthDistribution.Average()) / 2d; 113 var avgCXFragmentLength = crossoverFragmentLengthDistribution.Any() ? crossoverFragmentLengthDistribution.Average() : 0; 114 var avgReplacedCXFragmentLength = replacedCrossoverFragmentLengthDistribution.Any() ? replacedCrossoverFragmentLengthDistribution.Average() : 0; 115 var avgMutFragmentLength = mutationFragmentLengthDistribution.Any() ? mutationFragmentLengthDistribution.Average() : 0; 116 var avgReplacedMutFragmentLength = replacedMutationFragmentLengthDistribution.Any() ? replacedMutationFragmentLengthDistribution.Average() : 0; 117 var avgFragmentLength = (avgCXFragmentLength + avgMutFragmentLength) / 2d; 114 118 DataTable table; 115 119 if (!Results.ContainsKey("AverageFragmentLength")) { 116 120 table = new DataTable("Average fragment length"); 117 121 var row = new DataRow("Average fragment length") { VisualProperties = { StartIndexZero = true } }; 118 row.Values.Add(av erageFragmentLength);122 row.Values.Add(avgFragmentLength); 119 123 table.Rows.Add(row); 120 124 row = new DataRow("Average crossover fragment length") { VisualProperties = { StartIndexZero = true } }; 121 row.Values.Add( crossoverFragmentLengthDistribution.Average());125 row.Values.Add(avgCXFragmentLength); 122 126 table.Rows.Add(row); 123 127 row = new DataRow("Average replaced crossover fragment length") { VisualProperties = { StartIndexZero = true } }; 124 row.Values.Add( replacedCrossoverFragmentLengthDistribution.Average());128 row.Values.Add(avgReplacedCXFragmentLength); 125 129 table.Rows.Add(row); 126 130 row = new DataRow("Average mutation fragment length") { VisualProperties = { StartIndexZero = true } }; 127 row.Values.Add( mutationFragmentLengthDistribution.Average());131 row.Values.Add(avgMutFragmentLength); 128 132 table.Rows.Add(row); 129 133 row = new DataRow("Average replaced mutation fragment length") { VisualProperties = { StartIndexZero = true } }; 130 row.Values.Add( replacedMutationFragmentLengthDistribution.Average());134 row.Values.Add(avgReplacedMutFragmentLength); 131 135 table.Rows.Add(row); 132 136 Results.Add(new Result("AverageFragmentLength", table)); 133 137 } else { 134 138 table = (DataTable)Results["AverageFragmentLength"].Value; 135 table.Rows["Average fragment length"].Values.Add(av erageFragmentLength);136 table.Rows["Average crossover fragment length"].Values.Add( crossoverFragmentLengthDistribution.Average());137 table.Rows["Average replaced crossover fragment length"].Values.Add( replacedCrossoverFragmentLengthDistribution.Average());138 table.Rows["Average mutation fragment length"].Values.Add( mutationFragmentLengthDistribution.Average());139 table.Rows["Average replaced mutation fragment length"].Values.Add( replacedMutationFragmentLengthDistribution.Average());139 table.Rows["Average fragment length"].Values.Add(avgFragmentLength); 140 table.Rows["Average crossover fragment length"].Values.Add(avgCXFragmentLength); 141 table.Rows["Average replaced crossover fragment length"].Values.Add(avgReplacedCXFragmentLength); 142 table.Rows["Average mutation fragment length"].Values.Add(avgMutFragmentLength); 143 table.Rows["Average replaced mutation fragment length"].Values.Add(avgReplacedMutFragmentLength); 140 144 } 141 145 if (!Results.ContainsKey("FragmentLengthDistribution")) {
Note: See TracChangeset
for help on using the changeset viewer.