Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Views/MOSolution.cs @ 13988

Last change on this file since 13988 was 13988, checked in by bwerth, 8 years ago

#1087 moved project bugfixes

File size: 4.0 KB
RevLine 
[13672]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
21using System;
[13622]22using System.Drawing;
23using HeuristicLab.Common;
24using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
25
[13988]26namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
27  [StorableClass]
28  public class MOSolution : IMOFrontModel {
29    public bool CanChangeDescription {
30      get {
31        return false;
32      }
33    }
[13622]34
[13988]35    public bool CanChangeName {
36      get {
37        return false;
38      }
39    }
[13622]40
[13988]41    public string Description {
42      get {
43        return "MYResult";
44      }
[13622]45
[13988]46      set { }
47    }
[13622]48
[13988]49    public string Filename {
50      get { return "MyFilename"; }
[13622]51
[13988]52      set { }
53    }
[13622]54
[13988]55    public string ItemDescription {
56      get { return "this is MOSolutionImplementation"; }
57    }
[13622]58
[13988]59    public Image ItemImage {
60      get {
61        return HeuristicLab.Common.Resources.VSImageLibrary.Function;
62      }
63    }
[13622]64
[13988]65    public string ItemName {
66      get {
67        return "MOSolution";
68      }
69    }
[13622]70
[13988]71    public Version ItemVersion {
72      get { return Version.Parse("0.1"); }
73    }
[13622]74
[13988]75    public string Name {
76      get {
77        return ItemName;
78      }
[13622]79
[13988]80      set { }
81    }
[13622]82
[13988]83    private double[][] qualities;
[13622]84
[13988]85    public double[][] Qualities {
86      get {
87        return qualities;
88      }
[13622]89
[13988]90      set {
91        qualities = value;
92      }
93    }
[13622]94
[13988]95    private int objectives;
96    public int Objectives {
97      get {
98        return objectives;
99      }
[13622]100
[13988]101      set {
102        objectives = value;
103      }
104    }
[13622]105
[13988]106    private double[][] solutions;
107    public double[][] Solutions {
108      get {
109        return solutions;
110      }
[13622]111
[13988]112      set {
113        solutions = value;
114      }
115    }
[13622]116
[13988]117    private double[][] paretoFront;
118    public double[][] ParetoFront {
119      get {
120        return paretoFront;
121      }
[13622]122
[13988]123      set {
124        paretoFront = value;
125      }
126    }
[13622]127
[13988]128    public event EventHandler DescriptionChanged;
129    public event EventHandler ItemImageChanged;
130    public event EventHandler NameChanged;
131    public event EventHandler<CancelEventArgs<string>> NameChanging;
132    public event EventHandler ToStringChanged;
[13622]133
[13988]134    [StorableConstructor]
135    protected MOSolution(bool deserializing) : base() { }
[13729]136
137
[13988]138    protected MOSolution(MOSolution original, Cloner cloner) : this(original) {
139      this.qualities = original.qualities;
140      this.solutions = original.solutions;
141      this.paretoFront = original.paretoFront;
142      this.objectives = original.objectives;
143    }
144    protected MOSolution(MOSolution original) : base() {
145      this.qualities = original.qualities;
146      this.solutions = original.solutions;
147      this.paretoFront = original.paretoFront;
148      this.objectives = original.objectives;
149    }
150    protected MOSolution() : base() { }
151    public MOSolution(double[][] qualities, double[][] solutions, double[][] paretoFront, int objectives) {
152      this.qualities = qualities;
153      this.solutions = solutions;
154      this.paretoFront = paretoFront;
155      this.objectives = objectives;
156    }
[13622]157
[13988]158    public object Clone() {
159      return new MOSolution(this);
160    }
[13622]161
[13988]162    public IDeepCloneable Clone(Cloner cloner) {
163      return (IDeepCloneable)Clone();
[13622]164    }
[13988]165  }
[13622]166}
Note: See TracBrowser for help on using the repository browser.