Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/HeuristicLab.Problems.TestFunctions.MultiObjective/3.3/ParetoFrontScatterPlot.cs @ 15996

Last change on this file since 15996 was 15583, checked in by swagner, 7 years ago

#2640: Updated year of copyrights in license headers

File size: 3.2 KB
Line 
1#region License Information
2/* HeuristicLab
3 * Copyright (C) 2002-2018 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
22using System.Drawing;
23using System.Linq;
24using HeuristicLab.Common;
25using HeuristicLab.Core;
26using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
27
28namespace HeuristicLab.Problems.TestFunctions.MultiObjective {
29  [StorableClass]
30  [Item("Pareto Front Scatter Plot", "The optimal front, current front and its associated Points in the searchspace")]
31  public class ParetoFrontScatterPlot : Item {
32    public static new Image StaticItemImage {
33      get { return HeuristicLab.Common.Resources.VSImageLibrary.Performance; }
34    }
35
36    [Storable]
37    private int objectives;
38    public int Objectives {
39      get { return objectives; }
40    }
41
42    [Storable]
43    private int problemSize;
44    public int ProblemSize {
45      get { return problemSize; }
46    }
47
48    [Storable]
49    private double[][] qualities;
50    public double[][] Qualities {
51      get { return qualities; }
52    }
53
54    [Storable]
55    private double[][] solutions;
56    public double[][] Solutions {
57      get { return solutions; }
58    }
59
60    [Storable]
61    private double[][] paretoFront;
62    public double[][] ParetoFront {
63      get { return paretoFront; }
64    }
65
66    #region Constructor, Cloning & Persistance
67    public ParetoFrontScatterPlot(double[][] qualities, double[][] solutions, double[][] paretoFront, int objectives, int problemSize) {
68      this.qualities = qualities;
69      this.solutions = solutions;
70      this.paretoFront = paretoFront;
71      this.objectives = objectives;
72      this.problemSize = problemSize;
73    }
74    public ParetoFrontScatterPlot() { }
75
76    protected ParetoFrontScatterPlot(ParetoFrontScatterPlot original, Cloner cloner)
77      : base(original, cloner) {
78      if (original.qualities != null) qualities = original.qualities.Select(s => s.ToArray()).ToArray();
79      if (original.solutions != null) solutions = original.solutions.Select(s => s.ToArray()).ToArray();
80      if (original.paretoFront != null) paretoFront = original.paretoFront.Select(s => s.ToArray()).ToArray();
81      objectives = original.objectives;
82      problemSize = original.problemSize;
83    }
84    public override IDeepCloneable Clone(Cloner cloner) {
85      return new ParetoFrontScatterPlot(this, cloner);
86    }
87
88    [StorableConstructor]
89    protected ParetoFrontScatterPlot(bool deserializing)
90      : base(deserializing) { }
91    #endregion
92  }
93}
Note: See TracBrowser for help on using the repository browser.