Free cookie consent management tool by TermsFeed Policy Generator

source: stable/HeuristicLab.Problems.TestFunctions.MultiObjective/3.3/ParetoFrontScatterPlot.cs @ 16321

Last change on this file since 16321 was 15584, checked in by swagner, 7 years ago

#2640: Updated year of copyrights in license headers on stable

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