Changeset 17230 for branches/2521_ProblemRefactoring/HeuristicLab.Analysis/3.3/MultiObjective/ParetoFrontScatterPlot.cs
- Timestamp:
- 09/03/19 15:50:35 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Analysis/3.3/MultiObjective/ParetoFrontScatterPlot.cs
r17229 r17230 44 44 45 45 [Storable] 46 private I List<double[][]> fronts;47 public I List<double[][]> Fronts {46 private IReadOnlyList<double[][]> fronts; 47 public IReadOnlyList<double[][]> Fronts { 48 48 get { return fronts; } 49 49 } 50 50 51 51 [Storable] 52 private I List<T[]> items;53 public I List<T[]> Items {52 private IReadOnlyList<T[]> items; 53 public IReadOnlyList<T[]> Items { 54 54 get { return items; } 55 55 } 56 56 57 57 [Storable] 58 private I List<double[]> bestKnownFront;59 public I List<double[]> BestKnownFront {58 private IReadOnlyList<double[]> bestKnownFront; 59 public IReadOnlyList<double[]> BestKnownFront { 60 60 get { return bestKnownFront; } 61 61 } … … 64 64 protected ParetoFrontScatterPlot(StorableConstructorFlag _) : base(_) { } 65 65 public ParetoFrontScatterPlot() { } 66 public ParetoFrontScatterPlot(IList<double[][]> qualities, IList<T[]> items, IList<double[]> paretoFront, int objectives) { 66 /// <summary> 67 /// Provides the data for displaying a multi-objective population in a scatter plot. 68 /// </summary> 69 /// <param name="items">The solutions grouped by pareto front (first is best).</param> 70 /// <param name="qualities">The objective vectors grouped by pareto front (first is best).</param> 71 /// <param name="objectives">The number of objectives.</param> 72 /// <param name="bestKnownParetoFront">Optional, the best known front in objective space.</param> 73 public ParetoFrontScatterPlot(IReadOnlyList<T[]> items, IReadOnlyList<double[][]> qualities, int objectives, IReadOnlyList<double[]> bestKnownParetoFront = null) 74 { 67 75 this.fronts = qualities; 68 76 this.items = items; 69 this.bestKnownFront = paretoFront;77 this.bestKnownFront = bestKnownParetoFront; 70 78 this.objectives = objectives; 79 } 80 /// <summary> 81 /// Provides the data for displaying a multi-objective population in a scatter plot. 82 /// </summary> 83 /// <param name="fronts">The fronts (first is best) with the indices of the solutions and qualities.</param> 84 /// <param name="items">The solutions.</param> 85 /// <param name="qualities">The objective vectors for each solution.</param> 86 /// <param name="objectives">The number of objectives.</param> 87 /// <param name="bestKnownParetoFront">Optional, the best known front in objective space.</param> 88 public ParetoFrontScatterPlot(List<List<int>> fronts, IReadOnlyList<T> items, IReadOnlyList<double[]> qualities, int objectives, IReadOnlyList<double[]> bestKnownParetoFront = null) 89 { 90 this.fronts = fronts.Select(x => x.Select(y => qualities[y]).ToArray()).ToArray(); 91 this.items = fronts.Select(x => x.Select(y => items[y]).ToArray()).ToArray(); 92 this.bestKnownFront = bestKnownParetoFront; 93 this.objectives = objectives; 94 71 95 } 72 96 protected ParetoFrontScatterPlot(ParetoFrontScatterPlot<T> original, Cloner cloner)
Note: See TracChangeset
for help on using the changeset viewer.