[13672] | 1 | #region License Information
|
---|
| 2 | /* HeuristicLab
|
---|
[16565] | 3 | * Copyright (C) 2002-2019 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 |
|
---|
[15221] | 22 | using System.Drawing;
|
---|
[14092] | 23 | using System.Linq;
|
---|
[13622] | 24 | using HeuristicLab.Common;
|
---|
[14092] | 25 | using HeuristicLab.Core;
|
---|
[16565] | 26 | using HEAL.Attic;
|
---|
[13622] | 27 |
|
---|
[14111] | 28 | namespace HeuristicLab.Problems.TestFunctions.MultiObjective {
|
---|
[16565] | 29 | [StorableType("3BF7AD0E-8D55-4033-974A-01DB16F9E41A")]
|
---|
[15203] | 30 | [Item("Pareto Front Scatter Plot", "The optimal front, current front and its associated Points in the searchspace")]
|
---|
| 31 | public class ParetoFrontScatterPlot : Item {
|
---|
[15221] | 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]
|
---|
[16565] | 89 | protected ParetoFrontScatterPlot(StorableConstructorFlag _) : base(_) { }
|
---|
[15203] | 90 | #endregion
|
---|
[13988] | 91 | }
|
---|
[13622] | 92 | }
|
---|