Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/24/16 15:03:51 (8 years ago)
Author:
bwerth
Message:

#1087 added more functions (IHR1-4, IHR6, CIGTAB, ELLI)

File:
1 edited

Legend:

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

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