Changeset 15203 for trunk/sources/HeuristicLab.Problems.TestFunctions.MultiObjective/3.3/ParetoFrontScatterPlot.cs
- Timestamp:
- 07/11/17 19:36:03 (7 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.TestFunctions.MultiObjective/3.3/ParetoFrontScatterPlot.cs
r15202 r15203 19 19 */ 20 20 #endregion 21 21 22 using System.Linq; 22 23 using HeuristicLab.Common; … … 26 27 namespace HeuristicLab.Problems.TestFunctions.MultiObjective { 27 28 [StorableClass] 28 [Item("ScatterPlot", "The optimal front, current front and its associated Points in the searchspace")] 29 public class ScatterPlotContent : Item { 29 [Item("Pareto Front Scatter Plot", "The optimal front, current front and its associated Points in the searchspace")] 30 public class ParetoFrontScatterPlot : Item { 31 32 [Storable] 33 private int objectives; 34 public int Objectives { 35 get { return objectives; } 36 } 37 38 [Storable] 39 private int problemSize; 40 public int ProblemSize { 41 get { return problemSize; } 42 } 30 43 31 44 [Storable] 32 45 private double[][] qualities; 33 46 public double[][] Qualities { 34 get { 35 return qualities; 36 } 37 38 private set { 39 qualities = value; 40 } 41 } 42 43 [Storable] 44 private int objectives; 45 public int Objectives { 46 get { 47 return objectives; 48 } 49 50 private set { 51 objectives = value; 52 } 47 get { return qualities; } 53 48 } 54 49 … … 56 51 private double[][] solutions; 57 52 public double[][] Solutions { 58 get { 59 return solutions; 60 } 61 62 private set { 63 solutions = value; 64 } 53 get { return solutions; } 65 54 } 66 55 … … 68 57 private double[][] paretoFront; 69 58 public double[][] ParetoFront { 70 get { 71 return paretoFront; 72 } 73 74 private set { 75 paretoFront = value; 76 } 59 get { return paretoFront; } 77 60 } 78 61 79 [StorableConstructor] 80 protected ScatterPlotContent(bool deserializing) : base() { } 81 82 protected ScatterPlotContent(ScatterPlotContent original, Cloner cloner) 83 : this() { 84 this.qualities = original.qualities.Select(s => s.ToArray()).ToArray(); 85 this.solutions = original.solutions.Select(s => s.ToArray()).ToArray(); 86 this.paretoFront = original.paretoFront.Select(s => s.ToArray()).ToArray(); 87 this.objectives = original.objectives; 88 } 89 protected ScatterPlotContent() : base() { } 90 public ScatterPlotContent(double[][] qualities, double[][] solutions, double[][] paretoFront, int objectives) { 62 #region Constructor, Cloning & Persistance 63 public ParetoFrontScatterPlot(double[][] qualities, double[][] solutions, double[][] paretoFront, int objectives, int problemSize) { 91 64 this.qualities = qualities; 92 65 this.solutions = solutions; 93 66 this.paretoFront = paretoFront; 94 67 this.objectives = objectives; 68 this.problemSize = problemSize; 69 } 70 public ParetoFrontScatterPlot() { } 71 72 protected ParetoFrontScatterPlot(ParetoFrontScatterPlot original, Cloner cloner) 73 : base(original, cloner) { 74 if (original.qualities != null) qualities = original.qualities.Select(s => s.ToArray()).ToArray(); 75 if (original.solutions != null) solutions = original.solutions.Select(s => s.ToArray()).ToArray(); 76 if (original.paretoFront != null) paretoFront = original.paretoFront.Select(s => s.ToArray()).ToArray(); 77 objectives = original.objectives; 78 problemSize = original.problemSize; 79 } 80 public override IDeepCloneable Clone(Cloner cloner) { 81 return new ParetoFrontScatterPlot(this, cloner); 95 82 } 96 83 97 public override IDeepCloneable Clone(Cloner cloner) { 98 return new ScatterPlotContent(this, cloner); 99 } 84 [StorableConstructor] 85 protected ParetoFrontScatterPlot(bool deserializing) 86 : base(deserializing) { } 87 #endregion 100 88 } 101 89 }
Note: See TracChangeset
for help on using the changeset viewer.