Changeset 10119 for branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers
- Timestamp:
- 11/10/13 22:12:04 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/RunCollectionModifiers/RealVectorConvexHullModifier.cs
r10116 r10119 27 27 using HeuristicLab.Common; 28 28 using HeuristicLab.Core; 29 using HeuristicLab.Data; 29 30 using HeuristicLab.Encodings.RealVectorEncoding; 30 31 using HeuristicLab.Optimization; … … 53 54 54 55 var sols = solutionCache.GetSolutionsFromGeneration(i); 55 DataTable dt = new DataTable("Convex Hull Volume over Generations"); 56 DataTable volDataTable = new DataTable("Convex hull volume over generations"); 57 DataTable nrOfPointsTable = new DataTable("Nr. of points of convex hull"); 58 DoubleValue overallVolumn = new DoubleValue(); 59 56 60 DataRow dtVolumeRow = new DataRow("Volume"); 57 DataRow dtNrPointsRow = new DataRow("Nr. of Points"); 58 dt.Rows.Add(dtVolumeRow); 59 dt.Rows.Add(dtNrPointsRow); 61 DataRow dtNrPointsRow = new DataRow("Nr. of points"); 62 volDataTable.Rows.Add(dtVolumeRow); 63 nrOfPointsTable.Rows.Add(dtNrPointsRow); 64 65 List<double[]> curHull = null; 60 66 61 67 while (sols.Count != 0) { … … 66 72 dtNrPointsRow.Values.Add(convexHull.Count); 67 73 74 if (curHull == null) { 75 curHull = convexHull; 76 } else { 77 var newPHull = curHull.Union(convexHull).ToArray(); 78 curHull = LPHull.Calculate(newPHull); 79 } 80 68 81 sols = solutionCache.GetSolutionsFromGeneration(++i); 69 82 } 83 overallVolumn.Value = ConvexHullMeasures.CalculateVolume(curHull); 70 84 71 run.Results.Add("Convex Hull Measures", dt); 85 run.Results.Add("Overall volumn: ", overallVolumn); 86 run.Results.Add("Convex hull volumn", volDataTable); 87 run.Results.Add("Convex nr. of points", nrOfPointsTable); 72 88 } 73 89 }
Note: See TracChangeset
for help on using the changeset viewer.