Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/04/16 09:47:19 (8 years ago)
Author:
bwerth
Message:

#1087 moved project bugfixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Views/MOSolution.cs

    r13936 r13988  
    2424using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2525
    26 namespace HeuristicLab.Problems.MultiObjectiveTestFunctions
    27 {
    28     [StorableClass]
    29     class MOSolution : IMOFrontModel
    30     {
    31         public bool CanChangeDescription
    32         {
    33             get
    34             {
    35                 return false;
    36             }
    37         }
     26namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
     27  [StorableClass]
     28  public class MOSolution : IMOFrontModel {
     29    public bool CanChangeDescription {
     30      get {
     31        return false;
     32      }
     33    }
    3834
    39         public bool CanChangeName
    40         {
    41             get
    42             {
    43                 return false;
    44             }
    45         }
     35    public bool CanChangeName {
     36      get {
     37        return false;
     38      }
     39    }
    4640
    47         public string Description
    48         {
    49             get
    50             {
    51                 return "MYResult";
    52             }
     41    public string Description {
     42      get {
     43        return "MYResult";
     44      }
    5345
    54             set { }
    55         }
     46      set { }
     47    }
    5648
    57         public string Filename
    58         {
    59             get { return "MyFilename"; }
     49    public string Filename {
     50      get { return "MyFilename"; }
    6051
    61             set { }
    62         }
     52      set { }
     53    }
    6354
    64         public string ItemDescription
    65         {
    66             get { return "this is MOSolutionImplementation"; }
    67         }
     55    public string ItemDescription {
     56      get { return "this is MOSolutionImplementation"; }
     57    }
    6858
    69         public Image ItemImage
    70         {
    71             get
    72             {
    73                 return HeuristicLab.Common.Resources.VSImageLibrary.Function;
    74             }
    75         }
     59    public Image ItemImage {
     60      get {
     61        return HeuristicLab.Common.Resources.VSImageLibrary.Function;
     62      }
     63    }
    7664
    77         public string ItemName
    78         {
    79             get
    80             {
    81                 return "MOSolution";
    82             }
    83         }
     65    public string ItemName {
     66      get {
     67        return "MOSolution";
     68      }
     69    }
    8470
    85         public Version ItemVersion
    86         {
    87             get { return Version.Parse("0.1"); }
    88         }
     71    public Version ItemVersion {
     72      get { return Version.Parse("0.1"); }
     73    }
    8974
    90         public string Name
    91         {
    92             get
    93             {
    94                 return ItemName;
    95             }
     75    public string Name {
     76      get {
     77        return ItemName;
     78      }
    9679
    97             set { }
    98         }
     80      set { }
     81    }
    9982
    100         private double[][] qualities;
     83    private double[][] qualities;
    10184
    102         public double[][] Qualities
    103         {
    104             get
    105             {
    106                 return qualities;
    107             }
     85    public double[][] Qualities {
     86      get {
     87        return qualities;
     88      }
    10889
    109             set
    110             {
    111                 qualities = value;
    112             }
    113         }
     90      set {
     91        qualities = value;
     92      }
     93    }
    11494
    115         private int objectives;
    116         public int Objectives
    117         {
    118             get
    119             {
    120                 return objectives;
    121             }
     95    private int objectives;
     96    public int Objectives {
     97      get {
     98        return objectives;
     99      }
    122100
    123             set
    124             {
    125                 objectives = value;
    126             }
    127         }
     101      set {
     102        objectives = value;
     103      }
     104    }
    128105
    129         private double[][] solutions;
    130         public double[][] Solutions
    131         {
    132             get
    133             {
    134                 return solutions;
    135             }
     106    private double[][] solutions;
     107    public double[][] Solutions {
     108      get {
     109        return solutions;
     110      }
    136111
    137             set
    138             {
    139                 solutions = value;
    140             }
    141         }
     112      set {
     113        solutions = value;
     114      }
     115    }
    142116
    143         private double[][] paretoFront;
    144         public double[][] ParetoFront
    145         {
    146             get
    147             {
    148                 return paretoFront;
    149             }
     117    private double[][] paretoFront;
     118    public double[][] ParetoFront {
     119      get {
     120        return paretoFront;
     121      }
    150122
    151             set
    152             {
    153                 paretoFront = value;
    154             }
    155         }
     123      set {
     124        paretoFront = value;
     125      }
     126    }
    156127
    157         public event EventHandler DescriptionChanged;
    158         public event EventHandler ItemImageChanged;
    159         public event EventHandler NameChanged;
    160         public event EventHandler<CancelEventArgs<string>> NameChanging;
    161         public event EventHandler ToStringChanged;
     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;
    162133
    163         [StorableConstructor]
    164         protected MOSolution(bool deserializing) : base() { }
     134    [StorableConstructor]
     135    protected MOSolution(bool deserializing) : base() { }
    165136
    166137
    167         protected MOSolution(MOSolution original, Cloner cloner) : this(original)
    168         {
    169             this.qualities = original.qualities;
    170             this.solutions = original.solutions;
    171             this.paretoFront = original.paretoFront;
    172             this.objectives = original.objectives;
    173         }
    174         protected MOSolution(MOSolution original) : base()
    175         {
    176             this.qualities = original.qualities;
    177             this.solutions = original.solutions;
    178             this.paretoFront = original.paretoFront;
    179             this.objectives = original.objectives;
    180         }
    181         protected MOSolution() : base() { }
    182         public MOSolution(double[][] qualities, double[][] solutions, double[][] paretoFront, int objectives)
    183         {
    184             this.qualities = qualities;
    185             this.solutions = solutions;
    186             this.paretoFront = paretoFront;
    187             this.objectives = objectives;
    188         }
     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    }
    189157
    190         public object Clone()
    191         {
    192             return new MOSolution(this);
    193         }
     158    public object Clone() {
     159      return new MOSolution(this);
     160    }
    194161
    195         public IDeepCloneable Clone(Cloner cloner)
    196         {
    197             return (IDeepCloneable)Clone();
    198         }
     162    public IDeepCloneable Clone(Cloner cloner) {
     163      return (IDeepCloneable)Clone();
    199164    }
     165  }
    200166}
Note: See TracChangeset for help on using the changeset viewer.