1 | #region License Information
|
---|
2 | /* HeuristicLab
|
---|
3 | * Copyright (C) 2002-2016 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 | using System;
|
---|
22 | using System.Drawing;
|
---|
23 | using System.Linq;
|
---|
24 | using HeuristicLab.Common;
|
---|
25 | using HeuristicLab.Core;
|
---|
26 | using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
|
---|
27 |
|
---|
28 | namespace HeuristicLab.Problems.TestFunctions.MultiObjective {
|
---|
29 | [StorableClass]
|
---|
30 | [Item("ScatterPlot", "The optimal front, current front and its associated Points in the searchspace")]
|
---|
31 | public class ScatterPlotContent : Item {
|
---|
32 |
|
---|
33 | [Storable]
|
---|
34 | private double[][] qualities;
|
---|
35 | public double[][] Qualities {
|
---|
36 | get {
|
---|
37 | return qualities;
|
---|
38 | }
|
---|
39 |
|
---|
40 | private set {
|
---|
41 | qualities = value;
|
---|
42 | }
|
---|
43 | }
|
---|
44 |
|
---|
45 | [Storable]
|
---|
46 | private int objectives;
|
---|
47 | public int Objectives {
|
---|
48 | get {
|
---|
49 | return objectives;
|
---|
50 | }
|
---|
51 |
|
---|
52 | private set {
|
---|
53 | objectives = value;
|
---|
54 | }
|
---|
55 | }
|
---|
56 |
|
---|
57 | [Storable]
|
---|
58 | private double[][] solutions;
|
---|
59 | public double[][] Solutions {
|
---|
60 | get {
|
---|
61 | return solutions;
|
---|
62 | }
|
---|
63 |
|
---|
64 | private set {
|
---|
65 | solutions = value;
|
---|
66 | }
|
---|
67 | }
|
---|
68 |
|
---|
69 | [Storable]
|
---|
70 | private double[][] paretoFront;
|
---|
71 | public double[][] ParetoFront {
|
---|
72 | get {
|
---|
73 | return paretoFront;
|
---|
74 | }
|
---|
75 |
|
---|
76 | private set {
|
---|
77 | paretoFront = value;
|
---|
78 | }
|
---|
79 | }
|
---|
80 |
|
---|
81 | [StorableConstructor]
|
---|
82 | protected ScatterPlotContent(bool deserializing) : base() { }
|
---|
83 |
|
---|
84 | protected ScatterPlotContent(ScatterPlotContent original, Cloner cloner) : this() {
|
---|
85 | this.qualities = original.qualities.Select(s => s.ToArray()).ToArray();
|
---|
86 | this.solutions = original.solutions.Select(s => s.ToArray()).ToArray();
|
---|
87 | this.paretoFront = original.paretoFront.Select(s => s.ToArray()).ToArray();
|
---|
88 | this.objectives = original.objectives;
|
---|
89 | }
|
---|
90 | protected ScatterPlotContent() : base() { }
|
---|
91 | public ScatterPlotContent(double[][] qualities, double[][] solutions, double[][] paretoFront, int objectives) {
|
---|
92 | this.qualities = qualities;
|
---|
93 | this.solutions = solutions;
|
---|
94 | this.paretoFront = paretoFront;
|
---|
95 | this.objectives = objectives;
|
---|
96 | }
|
---|
97 |
|
---|
98 | public override IDeepCloneable Clone(Cloner cloner) {
|
---|
99 | return new ScatterPlotContent(this, cloner);
|
---|
100 | }
|
---|
101 | }
|
---|
102 | }
|
---|