Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/15/16 17:19:34 (9 years ago)
Author:
bwerth
Message:

#1087 regorganized testfunctions, added view for qualities

Location:
branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3
Files:
34 added
12 deleted
16 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Comparators/Crowding.cs

    r13562 r13620  
    11using System;
    22using System.Collections.Generic;
     3using System.Linq;
     4using HeuristicLab.Data;
    35using HeuristicLab.Encodings.RealVectorEncoding;
     6using HeuristicLab.Problems.MultiObjectiveTestFunctions.Comparators;
    47
    58namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
    69
    710  /// <summary>
    8   /// Crowding distance d(x,A) is usually defined between a point x and a set of points  A
     11  /// Crowding distance d(x,A) is usually defined between a point x and a set of points A
    912  /// d(x,A) is then a weighted sum over all dimensions where for each dimension the next larger and the next smaller Point to x are subtracted
    1013  /// I extended the concept and defined the Crowding distance of a front A as the mean of the crowding distances of every point x in A
    11   /// C(A) = mean(x,A) where x in A
     14  /// C(A) = mean(d(x,A)) where x in A  and d(x,A) is not infinite
    1215  /// </summary>
    1316  public class Crowding : IMultiObjectiveDistance {
    14     private double[][] bounds;
    15     public Crowding(double[][] bounds) {
     17    private double[,] bounds;
     18
     19    public Crowding(double[,] bounds) {
    1620      this.bounds = bounds;
     21
    1722    }
    1823
    19 
    20     public static double GetDistance(RealVector[] front, RealVector[] optimalFront, double[][] bounds) {
     24    public static double GetDistance(IEnumerable<double[]> front, IEnumerable<double[]> optimalFront, double[,] bounds) {
    2125      return new Crowding(bounds).Compare(front, optimalFront);
    2226    }
    2327
    24 
    25     public static double GetCrowding(RealVector[] front, double[][] bounds) {
     28    public static double GetCrowding(IEnumerable<double[]> front, double[,] bounds) {
    2629      return new Crowding(bounds).Get(front);
    2730    }
    2831
    29 
    30     public double Get(RealVector[] front) {
     32    public double Get(IEnumerable<double[]> front) {
    3133      double sum = 0;
    32       foreach(RealVector point in front) {
    33         sum += CalcCrowding(point, front);
     34      int c = 0;
     35      foreach (double[] point in front) {
     36        double d = CalcCrowding(point, front);
     37        if (!Double.IsInfinity(d)) {
     38          sum += d;
     39          c++;
     40        }
    3441      }
    35       return sum / front.Length;
     42      return c==0?Double.PositiveInfinity:sum / c;
    3643    }
    3744
    38     public double Compare(RealVector[] front, RealVector[] optimalFront) {
     45    public double Compare(IEnumerable<double[]> front, IEnumerable<double[]> optimalFront) {
    3946      return Get(optimalFront) - Get(front);
    4047    }
    4148
    42     private double CalcCrowding(RealVector point, RealVector[] list) {
     49    private double CalcCrowding(double[] point, IEnumerable<double[]> list) {
    4350      double sum = 0;
    4451      for (int i = 0; i < point.Length; i++) {
     
    4855    }
    4956
    50     private double CalcCrowding(RealVector point, RealVector[] list, int dim) {
    51       double fmax = bounds[dim % bounds.Length][1];
    52       double fmin = bounds[dim % bounds.Length][0];
    53 
    54       Array.Sort<RealVector>(list, new DimensionComparer(dim, false));
    55       if (list[0][dim] == point[0] || list[list.Length - 1][dim] == point[0]) return Double.PositiveInfinity;
    56       int pos = binarySearch(point[dim], list, dim);
    57       return (list[pos + 1][dim] - list[pos - 1][dim] )/ (fmax - fmin);
    58     }
    59 
    60     private int binarySearch(double x, RealVector[] list, int dim) {
    61       int low = 0;
    62       int high = list.Length - 1;
    63       while (high >= low) {
    64         int middle = (low + high) / 2;
    65         if (list[middle][dim] == x) return middle;
    66         if (list[middle][dim] < x)  low = middle + 1;
    67         if (list[middle][dim] > x)  high = middle - 1;
    68       }
    69       return -1; //This should never happen
    70     }
    71 
    72     private class DimensionComparer : IComparer<RealVector> {
    73       private int dim;
    74       private int descending;
    75 
    76       public DimensionComparer(int dimension, bool descending) {
    77         this.dim = dimension;
    78         this.descending = descending ? -1 : 1;
    79       }
    80 
    81       #region IComparer<DoubleArray> Members
    82 
    83       public int Compare(RealVector x, RealVector y) {
    84         if (x[dim] < y[dim]) return -descending;
    85         else if (x[dim] > y[dim]) return descending;
    86         else return 0;
    87       }
    88 
    89       #endregion
     57    private double CalcCrowding(double[] point, IEnumerable<double[]> list, int dim) {
     58      double fmax = bounds[dim % bounds.GetLength(0), 1];
     59      double fmin = bounds[dim % bounds.GetLength(0), 0];
     60      double[][] arr = list.ToArray();  //TODO Shady
     61      Array.Sort<double[]>(arr, Utilities.getDimensionComparer(dim, false));
     62      if (arr[0][dim] == point[0] || arr[arr.Length - 1][dim] == point[0]) return Double.PositiveInfinity;
     63      int pos = Utilities.binarySearch(point[dim], arr, dim);
     64      if (pos == 0 || pos == list.Count()-1) return Double.PositiveInfinity;
     65      return (arr[pos + 1][dim] - arr[pos - 1][dim]) / (fmax - fmin);
    9066    }
    9167
  • branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Comparators/GenerationalDistance.cs

    r13562 r13620  
    11using System;
     2using System.Collections.Generic;
    23using HeuristicLab.Encodings.RealVectorEncoding;
     4using HeuristicLab.Problems.MultiObjectiveTestFunctions.Comparators;
    35
    46namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
     
    1517    }
    1618
    17 
    18     public static double GetDistance(RealVector[] front, RealVector[] optimalFront, double p) {
     19    public static double GetDistance(IEnumerable<double[]> front, IEnumerable<double[]> optimalFront, double p) {
    1920     return new GenerationalDistance(p).Compare(front,optimalFront);
    2021    }
    2122
    22     public double Compare(RealVector[] front, RealVector[] optimalFront) {
    23      //TODO build a kd-tree, sort the array, do someting intelligent here
    24      double sum = 0;
    25       if (front.Length == 0 || optimalFront.Length == 0) throw new Exception("Both Fronts need to contain at least one point");
    26      foreach(RealVector r in front) {
    27         sum += minDistance(r, optimalFront);
     23    public double Compare(IEnumerable<double[]> front, IEnumerable<double[]> optimalFront) {
     24      //TODO build a kd-tree, sort the array, do someting intelligent here
     25      if (front == null || optimalFront == null) throw new ArgumentException("Fronts must not be null");
     26      double sum = 0;
     27      int c = 0;
     28     foreach(double[] r in front) {
     29        sum += Utilities.minDistance(r, optimalFront,true);
     30        c++;
    2831      }
    29       return Math.Pow(sum, p) /front.Length;
     32      if (c == 0) throw new ArgumentException("Fronts must not be empty");
     33      return Math.Pow(sum, p) /c;
    3034    }
    3135
    32     private double minDistance(RealVector point, RealVector[] list) {
    33       //TODO inefficient
    34       double min = Double.MaxValue;
    35       foreach (RealVector r in list) {
    36         if (r == point) continue;
    37         double d = 0;
    38         for (int i = 0; i < r.Length; i++) {
    39           d += (point[i] - r[i]) * (point[i] - r[i]);
    40         }
    41         min = Math.Min(d, min);
    42       }
    43       return Math.Sqrt(min);
    44     }
     36   
    4537
    4638  }
  • branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Comparators/HyperVolume.cs

    r13562 r13620  
    11using System;
    22using System.Collections.Generic;
    3 using HeuristicLab.Encodings.RealVectorEncoding;
     3using System.Linq;
     4using HeuristicLab.Problems.MultiObjectiveTestFunctions.Comparators;
    45
    56namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
     
    2930  public class Hypervolume : IMultiObjectiveDistance {
    3031
    31     private RealVector reference;
     32    private double[] reference;
    3233    private bool[] maximization;
    33     public Hypervolume(RealVector reference, bool[] maximization) {
     34    public Hypervolume(double[] reference, bool[] maximization) {
    3435      if (reference.Length != 2) throw new Exception("Only 2-dimensional cases are supported yet");
    3536      this.reference = reference;
     
    3738    }
    3839
    39     public double Compare(RealVector[] front, RealVector[] optimalFront) {
     40    public double Compare(IEnumerable<double[]> front, IEnumerable<double[]> optimalFront) {
    4041      return GetHypervolume(optimalFront) - GetHypervolume(front);
    4142
    4243    }
    4344
    44     public double GetHypervolume(RealVector[] front) {
     45    public double GetHypervolume(IEnumerable<double[]> front) {
     46      if (front == null) throw new ArgumentException("Fronts must not be null");
    4547      //TODO what to do if set contains dominated points
    46       front = (RealVector[])front.Clone(); //TODO this seems shady
    47       Array.Sort<RealVector>(front, new DimensionComparer(0, maximization[0]));
    48       RealVector last = front[front.Length - 1];
     48      double[][] set = front.ToArray();   //Still no Good
     49      if (set.Length == 0) throw new ArgumentException("Fronts must not be empty");
     50      Array.Sort<double[]>(set, Utilities.getDimensionComparer(0, maximization[0]));
     51      double[] last = set[set.Length - 1];
    4952      CheckConsistency(last, 0);
    5053      CheckConsistency(last, 1);
    5154      double sum = 0;
    52       for (int i = 0; i < front.Length - 1; i++) {
    53         CheckConsistency(front[i], 1);
    54         sum += Math.Abs((front[i][0] - front[i + 1][0])) * Math.Abs((front[i][1] - reference[1]));
     55      for (int i = 0; i < set.Length - 1; i++) {
     56        CheckConsistency(set[i], 1);
     57        sum += Math.Abs((set[i][0] - set[i + 1][0])) * Math.Abs((set[i][1] - reference[1]));
    5558      }
    5659
     
    5962    }
    6063
    61     public static double GetHypervolume(RealVector[] front, RealVector reference, bool[] maximization){
     64    public static double GetHypervolume(IEnumerable<double[]> front, double[] reference, bool[] maximization){
    6265      Hypervolume comp = new Hypervolume(reference, maximization);
    6366      return comp.GetHypervolume(front);
    6467    }
    6568
    66     public static double GetDistance(RealVector[] front, RealVector[] optimalFront, RealVector reference, bool[] maximization) {
     69    public static double GetDistance(IEnumerable<double[]> front, IEnumerable<double[]> optimalFront, double[] reference, bool[] maximization) {
    6770      return GetHypervolume(optimalFront, reference, maximization) - GetHypervolume(front, reference, maximization);
    6871    }
    6972
    70     private void CheckConsistency(RealVector point, int dim) {
    71       if (!maximization[dim] && point[dim] > reference[dim]) throw new Exception("Reference Point must be dominated by all points of the front");
    72       if (maximization[dim] && point[dim] < reference[dim]) throw new Exception("Reference Point must be dominated by all points of the front");
    73       if (point.Length != 2) throw new Exception("Only 2-dimensional cases are supported yet");
     73    private void CheckConsistency(double[] point, int dim) {
     74      if (!maximization[dim] && point[dim] > reference[dim]) throw new ArgumentException("Reference Point must be dominated by all points of the front");
     75      if (maximization[dim] && point[dim] < reference[dim]) throw new ArgumentException("Reference Point must be dominated by all points of the front");
     76      if (point.Length != 2) throw new ArgumentException("Only 2-dimensional cases are supported yet");
    7477    }
    75 
    76     private class DimensionComparer : IComparer<RealVector> {
    77       private int dim;
    78       private int descending;
    79 
    80       public DimensionComparer(int dimension, bool descending) {
    81         this.dim = dimension;
    82         this.descending = descending ? -1 : 1;
    83       }
    84 
    85       #region IComparer<DoubleArray> Members
    86 
    87       public int Compare(RealVector x, RealVector y) {
    88         if (x[dim] < y[dim]) return -descending;
    89         else if (x[dim] > y[dim]) return descending;
    90         else return 0;
    91       }
    92 
    93       #endregion
    94     }
    95 
    9678  }
    9779}
  • branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Comparators/HyperVolumeFast.cs

    r13562 r13620  
    11using System;
    22using System.Collections.Generic;
    3 using HeuristicLab.Encodings.RealVectorEncoding;
     3using HeuristicLab.Common;
     4using HeuristicLab.Problems.MultiObjectiveTestFunctions.Comparators;
    45
    56namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
     
    2930  public class FastHypervolume {
    3031
    31     private RealVector reference;
     32    private double[] reference;
    3233    private bool[] maximization;
    33     public FastHypervolume(RealVector reference, bool[] maximization) {
    34       if (reference.Length != 2) throw new Exception("Only 2-dimensional cases are supported yet");
     34    public FastHypervolume(double[] reference, bool[] maximization) {
     35      if (reference.Length != 2) throw new NotSupportedException("Only 2-dimensional cases are supported yet");
    3536      this.reference = reference;
    3637      this.maximization = maximization;
    3738    }
    3839
    39     public double Compare(RealVector[] front, RealVector[] optimalFront, double[][] bounds) {
     40    public double Compare(IEnumerable<double[]> front, IEnumerable<double[]> optimalFront, double[,] bounds) {
    4041      return GetHypervolume(optimalFront, bounds) - GetHypervolume(front, bounds);
    4142
     
    4950    /// <param name="bounds">also called region</param>
    5051    /// <returns></returns>
    51     public double GetHypervolume(RealVector[] front, double[][] bounds) {
     52    public double GetHypervolume(IEnumerable<double[]> front, double[,] bounds) {
    5253      //TODO what to do if set contains dominated points
    53       var list = new List<RealVector>();
     54      if (front == null) throw new ArgumentException("Fronts must not be null");
     55      var list = new List<double[]>();
    5456      list.AddRange(front);
    55       list.Sort(new DimensionComparer(reference.Length - 1, maximization[reference.Length - 1]));
     57      list.Sort(Utilities.getDimensionComparer(reference.Length - 1, maximization[reference.Length - 1]));
    5658      var results = new ExPrivates(this);
    57       GetHV(DeepClone(bounds), list, 1, reference[reference.Length - 1], results);
     59      GetHV(SpanRegion(), list, 0, reference[reference.Length - 1], results);
    5860      return results.Volume;
    5961
    6062    }
     63
     64    private double[][] SpanRegion(double[,] bounds, int length) {
     65      if (bounds.GetLength(1) != 2) throw new ArgumentException();
     66      double[][] copy = new double[length][];
     67      for (int i = 0; i < copy.Length; i++) {
     68        copy[i] = new double[2];
     69        for (int j = 0; j < 2; j++) {
     70          copy[i][j] = bounds[i%bounds.GetLength(0),j];
     71        }
     72      }
     73      return copy;
     74    }
     75
     76    private double[][] SpanRegion() {
     77      double[][] copy = new double[reference.Length][];
     78      for (int i = 0; i < copy.Length; i++) {
     79        copy[i] = new double[2];
     80        copy[i][0] = 0;
     81        copy[i][1] = reference[i];
     82      }
     83      return copy;
     84
     85    }
     86
    6187
    6288    private double[][] DeepClone(double[][] array) {
     
    6490      for (int i = 0; i < copy.Length; i++) {
    6591        copy[i] = new double[array[i].Length];
    66         for (int j = 0; i < array[i].Length; j++) {
     92        for (int j = 0; j < array[i].Length; j++) {
    6793          copy[i][j] = array[i][j];
    6894        }
     
    80106
    81107      public int D {
    82         get { return D; }
     108        get { return d; }
    83109      }
    84110      public ExPrivates(FastHypervolume hv) {
     
    91117    }
    92118
    93     private void GetHV(double[][] region, List<RealVector> points, int split, double cover, ExPrivates results) {
     119    private void GetHV(double[][] region, List<double[]> points, int split, double cover, ExPrivates results) {
    94120      double coverNew = cover;
    95       int coverIndex = 1;
     121      int coverIndex = 0;
    96122      bool allPiles = true;
    97       int bound = -1;
     123      double bound = -1;
    98124
    99125      /* is the region completely covered? */
     
    101127        if (covers(points[coverIndex], region, results)) {
    102128          coverNew = points[coverIndex][results.D];
    103           results.Volume += getMeasure(region) * (cover - coverNew);
    104         } else { }
    105         coverIndex++;
    106       }
    107       if (coverIndex == 1) return;
    108 
    109       for (int i = 1; i < coverIndex; i++) { if (checkPile(points[i], region) == -1) allPiles = false; }
     129          results.Volume += GetMeasure(region,results) * (cover - coverNew);
     130        } else coverIndex++;
     131      }
     132      if (coverIndex == 0) return;
     133
     134      for (int i = 0; i < coverIndex; i++) { if (checkPile(points[i], region, results) == -1) allPiles = false; }
    110135
    111136      if (allPiles) {
    112137        /* calculate volume by sweeping along dimension d */
    113138        var trellis = new double[reference.Length];
    114         int i = 1;
    115         for (int j = 1; j < results.D; j++) trellis[j] = reference[j];
     139        int i = 0;
     140        for (int j = 0; j < results.D-1; j++) trellis[j] = reference[j];
    116141
    117142        double next;//bernhard
    118143        do {
    119           double current = points[i][results.D];
     144          double current = points[i][results.D-1];
    120145          do {
    121             int pile = getPile(points[i], region);
     146            int pile = checkPile(points[i], region,results);
    122147            if (points[i][pile] < trellis[pile]) trellis[pile] = points[i][pile];
    123148            i++;
    124             if (i < coverIndex - 1) next = points[i][results.D]; else next = coverNew;
     149            if (i < coverIndex - 1) next = points[i][results.D-1]; else next = coverNew;
    125150          } while (current == next);
    126           results.Volume += measure(trellis, region) * (next - current);
     151          results.Volume += measure(trellis, region, results) * (next - current);
    127152        } while (next != coverNew);
    128153
     
    131156        do {
    132157          var intersect = new List<Double>(); var nonIntersect = new List<Double>();
    133           for (int i = 1; i < coverIndex; i++) {
     158          for (int i = 0; i < coverIndex; i++) {
    134159            var intersection = intersects(points[i], region, split);
    135160            if (intersection == 1) intersect.Add(points[i][split]);
    136161            if (intersection == 0) nonIntersect.Add(points[i][split]);
    137162          }
    138           if (intersect.Count != 0) bound = median(intersect);
    139           else if (nonIntersect.Count > Math.Sqrt(n)) bound = median(nonIntersect);
     163          if (intersect.Count != 0) bound = intersect.Median();
     164          else if (nonIntersect.Count > Math.Sqrt(points.Count)) bound = nonIntersect.Median();
    140165          else split++;
    141166        } while (bound == -1);
     
    145170      var regionC = DeepClone(region);
    146171      regionC[split][1] = bound;
    147       var pointsC = new List<RealVector>();
    148       for (int i = 1; i < coverIndex; i++) {
    149         if (partCovers(points[i], regionC, results)) move(points[i], pointsC);
     172      var pointsC = new List<double[]>();
     173      for (int i = 0; i < coverIndex; i++) {
     174        if (partCovers(points[i], regionC, results)) move(points,i, pointsC);
    150175      }
    151176      if (pointsC.Count != 0) GetHV(regionC, pointsC, split, coverNew, results);
     
    153178      regionC = region;
    154179      regionC[split][0] = bound;
    155       pointsC = new List<RealVector>();
     180      pointsC = new List<double[]>();
    156181      for (int i = 1; i < coverIndex; i++) {
    157         if (partCovers(points[i], regionC, results)) move(points[i], pointsC);
     182        if (partCovers(points[i], regionC, results)) move(points,i, pointsC);
    158183      }
    159184      if (pointsC.Count != 0) GetHV(regionC, pointsC, split, coverNew, results);
     
    161186    }
    162187
    163     private int checkPile(RealVector point, double[][] region, ExPrivates results) {
     188    private void reinsert(List<double[]> pointsC, List<double[]> points) {
     189      points.AddRange(pointsC);
     190      pointsC.Clear();
     191    }
     192
     193    private double GetMeasure(double[][] region,ExPrivates result) {
     194      double volume = 1.0;
     195      // for ( std::size_t i = 0; i < regionLow.size(); i++ ) {
     196      for (int i = 1; i < result.D; i++) {
     197      volume *= (region[1][i] - region[0][i]);
     198      }
     199      return (volume);
     200    }
     201
     202    private void move(List<double[]> points, int i, List<double[]> pointsC) {
     203      double[] v = points[i];
     204      points.Remove(v);
     205      pointsC.Add(v);
     206    }
     207
     208    private double measure(double[] trellis, double[][] region, ExPrivates results) {
     209      double volume=0;
     210      bool[] indicator = new bool[results.D];
     211      for (int i = 0; i < results.D-1; i++) indicator[i] = true;
     212      int numberSummands = integerValue(indicator);
     213
     214      for (int i = 0; i <= numberSummands; i++) {
     215        indicator = binaryValue(i);
     216        int oneCounter = 0;
     217        double summand = 0;
     218        for (int j = 1; j < results.D; j++) {
     219          if (indicator[i] == true) {
     220            summand += region[1][j] - trellis[j];
     221            oneCounter++;
     222          } else {
     223            summand += region[1][j] - region[0][j];
     224          }
     225        }
     226        if(oneCounter%2 == 0) {
     227          volume -= summand;
     228        } else {
     229          volume += summand;
     230        }
     231      }
     232      return volume;
     233    }
     234
     235    private int integerValue(bool[] binary) {
     236      int sum=0;
     237      foreach (bool b in binary) {
     238        sum = (sum << 1) + (b ? 1 : 0);
     239      }
     240      return sum;
     241    }
     242
     243    private bool[] binaryValue(int integer) {
     244      bool[] res = new bool[32];
     245      int i = 0;
     246      while (integer != 0) {
     247        res[i++]= (integer & 1)==1;
     248        integer >>= 1;
     249      }
     250      return res;
     251
     252    }
     253
     254    private int checkPile(double[] point, double[][] region, ExPrivates results) {
    164255      int pile = -1;
    165       for (int j = 1; j < results.D; j++) {
     256      for (int j = 0; j < results.D-1; j++) {
    166257        if (point[j] > region[j][0]) {
    167258          if (pile != -1) return -1;
     
    173264    }
    174265
    175     private int intersects(RealVector point, double[][] region, int split) {
     266    private int intersects(double[] point, double[][] region, int split) {
    176267      if (region[split][0] >= point[split]) return -1;
    177268      for (int j = 1; j < split; j++) {
     
    182273    }
    183274
    184     private bool covers(RealVector point, double[][] region, ExPrivates results) {
     275    private bool covers(double[] point, double[][] region, ExPrivates results) {
    185276      for (int j = 1; j < results.D; j++) {
    186277        if (point[j] > region[j][0]) return false;
     
    190281    }
    191282
    192     private bool partCovers(RealVector point, double[][] region, ExPrivates results) {
     283    private bool partCovers(double[] point, double[][] region, ExPrivates results) {
    193284      for (int j = 1; j < results.D; j++) {
    194285        if (point[j] >= region[j][1]) return false;
     
    197288    }
    198289
    199     public static double GetHypervolume(RealVector[] front, RealVector reference, bool[] maximization) {
    200       Hypervolume comp = new Hypervolume(reference, maximization);
    201       return comp.GetHypervolume(front);
    202     }
    203 
    204     public static double GetDistance(RealVector[] front, RealVector[] optimalFront, RealVector reference, bool[] maximization) {
    205       return GetHypervolume(optimalFront, reference, maximization) - GetHypervolume(front, reference, maximization);
    206     }
    207 
    208     private void CheckConsistency(RealVector point, int dim) {
     290    public static double GetHypervolume(IEnumerable<double[]> front, double[] reference, bool[] maximization, double[,] bounds) {
     291      FastHypervolume comp = new FastHypervolume(reference, maximization);
     292      return comp.GetHypervolume(front,bounds);
     293    }
     294
     295    public static double GetDistance(IEnumerable<double[]> front, IEnumerable<double[]> optimalFront, double[] reference, bool[] maximization, double[,] bounds) {
     296      return GetHypervolume(optimalFront, reference, maximization, bounds) - GetHypervolume(front, reference, maximization,bounds);
     297    }
     298
     299    private void CheckConsistency(double[] point, int dim) {
    209300      if (!maximization[dim] && point[dim] > reference[dim]) throw new Exception("Reference Point must be dominated by all points of the front");
    210301      if (maximization[dim] && point[dim] < reference[dim]) throw new Exception("Reference Point must be dominated by all points of the front");
    211302    }
    212303
    213     private class DimensionComparer : IComparer<RealVector> {
    214       private int dim;
    215       private int descending;
    216 
    217       public DimensionComparer(int dimension, bool descending) {
    218         this.dim = dimension;
    219         this.descending = descending ? -1 : 1;
    220       }
    221 
    222       #region IComparer<DoubleArray> Members
    223 
    224       public int Compare(RealVector x, RealVector y) {
    225         if (x[dim] < y[dim]) return -descending;
    226         else if (x[dim] > y[dim]) return descending;
    227         else return 0;
    228       }
    229 
    230       #endregion
    231     }
     304
     305
     306
     307
     308
     309
     310   
     311
    232312
    233313  }
  • branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Comparators/InvertedGenerationalDistance.cs

    r13562 r13620  
    11using System;
     2using System.Collections.Generic;
    23using HeuristicLab.Encodings.RealVectorEncoding;
     4using HeuristicLab.Problems.MultiObjectiveTestFunctions.Comparators;
    35
    46namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
     
    1113
    1214    public InvertedGenerationalDistance(double p) {
     15      if (p <= 0) throw new ArgumentOutOfRangeException("weighting factor p has to be greater than 0");
    1316      this.p = 1 / p;
    1417    }
    15 
    16 
    1718
    1819    /// <summary>
     
    2324    /// <param name="p"></param>
    2425    /// <returns></returns>
    25     public static double GetDistance(RealVector[] front, RealVector[] optimalFront, double p) {
     26    public static double GetDistance(IEnumerable<double[]> front, IEnumerable<double[]> optimalFront, double p) {
    2627      return new InvertedGenerationalDistance(p).Compare(front, optimalFront);
    2728    }
    2829
    29     public double Compare(RealVector[] front, RealVector[] optimalFront) {
    30       //TODO build a kd-tree, sort the array, do someting intelligent here
    31       double sum = 0;
    32       if (front.Length == 0 || optimalFront.Length == 0) throw new Exception("Both Fronts need to contain at least one point");
    33       foreach (RealVector r in optimalFront) {
    34         sum += minDistance(r, front);
    35       }
    36       return Math.Pow(sum, p) / optimalFront.Length;
     30    public double Compare(IEnumerable<double[]> front, IEnumerable<double[]> optimalFront) {
     31      return new GenerationalDistance(p).Compare(optimalFront, front);
    3732    }
    38 
    39     private double minDistance(RealVector point, RealVector[] list) {
    40       //TODO inefficient
    41       double min = Double.MaxValue;
    42       foreach (RealVector r in list) {
    43         if (r == point) continue;
    44         double d = 0;
    45         for (int i = 0; i < r.Length; i++) {
    46           d += (point[i] - r[i]) * (point[i] - r[i]);
    47         }
    48         min = Math.Min(d, min);
    49       }
    50       return Math.Sqrt(min);
    51     }
    52 
    5333  }
    5434}
  • branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Comparators/Spacing.cs

    r13562 r13620  
    11using System;
     2using System.Collections.Generic;
     3using HeuristicLab.Common;
    24using HeuristicLab.Encodings.RealVectorEncoding;
     5using HeuristicLab.Problems.MultiObjectiveTestFunctions.Comparators;
    36
    47namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
     
    1518
    1619
    17     public static double GetSpacing(RealVector[] front) {
     20    public static double GetSpacing(IEnumerable<double[]> front) {
    1821      return new Spacing().Get(front);
    1922    }
    20     public static double GetDistance(RealVector[] front, RealVector[] optimalFront) {
     23    public static double GetDistance(IEnumerable<double[]> front, IEnumerable<double[]> optimalFront) {
    2124      return new Spacing().Get(front);
    2225    }
    2326
    24     public double Compare(RealVector[] front, RealVector[] optimalFront) {
     27    public double Compare(IEnumerable<double[]> front, IEnumerable<double[]> optimalFront) {
    2528      return GetSpacing(front) - GetSpacing(optimalFront);
    2629    }
    2730
    28     public double Get(RealVector[] front) {
     31    public double Get(IEnumerable<double[]> front) {
    2932      //TODO build a kd-tree, sort the array, do someting intelligent here
    30       double sum = 0;
    31       if (front.Length == 0) throw new Exception("Front does not contain any points");
    32       double[] d = new double[front.Length];
    33       int i = 0;
    34       foreach (RealVector r in front) {
    35         d[i] = minDistance(r, front);
    36         sum += d[i++];
     33      if (front == null) throw new ArgumentException("Fronts must not be null");
     34      List<double> d = new List<double>();
     35      foreach (double[] r in front) {
     36        double dist = Utilities.minDistance(r, front, false);
     37        d.Add(dist>=0?dist:0);
     38      }
     39      int n = d.Count;
     40      if (n == 0) throw new ArgumentException("Fronts must not be empty");
     41      return Math.Sqrt(d.Variance()*(n-1)/n);
    3742
    38       }
    39       double mean = sum / front.Length;
    40       sum = 0;
    41       foreach (double e in d) {
    42         sum += (e - mean) * (e - mean);
    43       }
    44       sum /= front.Length;
    45       return Math.Sqrt(sum);
    46 
    47     }
    48 
    49     private double minDistance(RealVector point, RealVector[] list) {
    50       //TODO inefficient
    51       double min = Double.MaxValue;
    52       foreach (RealVector r in list) {
    53         if (r == point) continue;
    54         double d = 0;
    55         for (int i = 0; i < r.Length; i++) {
    56           d += (point[i] - r[i]) * (point[i] - r[i]);
    57         }
    58         min = Math.Min(d, min);
    59       }
    60       return Math.Sqrt(min);
    6143    }
    6244
  • branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Interfaces/IMultiObjectiveDistance.cs

    r13562 r13620  
    1 using HeuristicLab.Encodings.RealVectorEncoding;
     1using System.Collections.Generic;
    22
    33namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
     
    1010    /// <param name="optimalFront">an array of 2-dimensional? RealVectors that denote the optimal Pareto front for a given Problem</param>
    1111    /// <returns></returns>
    12     double Compare(RealVector[] front, RealVector[] optimalFront);
     12    double Compare(IEnumerable<double[]> front, IEnumerable<double[]> optimalFront);
    1313
    1414  }
  • branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Interfaces/IMultiObjectiveTestFunction.cs

    r13515 r13620  
    2020#endregion
    2121
     22using System.Collections.Generic;
    2223using HeuristicLab.Core;
    23 using HeuristicLab.Data;
    2424using HeuristicLab.Encodings.RealVectorEncoding;
    2525
     
    2929  /// </summary>
    3030  public interface IMultiObjectiveTestFunction : INamedItem {
    31     bool[] Maximization { get; }
    32     DoubleMatrix Bounds { get; }
    33     int MinimumProblemSize { get; }
    34     int MaximumProblemSize { get; }
    35     int MinimumSolutionSize { get; }
    36     int MaximumSolutionSize { get; }
    37     int ActualSolutionSize { get; set; }
     31    bool[] Maximization(int objectives);
     32    double[,] Bounds(int objectives);
     33    IEnumerable<double[]> OptimalParetoFront(int objectives);
     34    double[] ReferencePoint(int objectives);
     35    double BestKnownHypervolume(int objectives);
    3836
     37    int MinimumSolutionLength { get; }
     38    int MaximumSolutionLength { get; }
     39    int MinimumObjectives { get; }
     40    int MaximumObjectives { get; }
    3941
    40     RealVector[] OptimalParetoFront { get; }
    41     RealVector ReferencePoint { get; }
    42     double BestKnownHypervolume { get; }
    43 
    44 
    45     double[] Evaluate(RealVector point);
     42    double[] Evaluate(RealVector point, int objectives);
    4643  }
    4744}
  • branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/MultiObjectiveTestFunctionProblem.cs

    r13515 r13620  
    11using System;
     2using System.Collections.Generic;
    23using HeuristicLab.Common;
    34using HeuristicLab.Core;
     
    78using HeuristicLab.Parameters;
    89using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     10using HeuristicLab.Problems.Instances;
    911using HeuristicLab.Problems.MultiObjectiveTestFunctions;
     12using HeuristicLab.Problems.MultiObjectiveTestFunctions.Drawings;
    1013
    1114namespace HeuristicLab.Problems.MultiObjectiveTestFunction {
    1215  [StorableClass]
    13   public class MultiObjectiveTestFunctionProblem : MultiObjectiveBasicProblem<RealVectorEncoding> {
     16  public class MultiObjectiveTestFunctionProblem : MultiObjectiveBasicProblem<RealVectorEncoding>, IProblemInstanceConsumer<MOTFData> {
    1417
    1518
     
    1720    public override bool[] Maximization {
    1821      get {
    19         return Parameters.ContainsKey("TestFunction") ? TestFunction.Maximization : new bool[2];
     22        return Parameters.ContainsKey("TestFunction") ? TestFunction.Maximization(Objectives) : new bool[2];
    2023      }
    2124    }
     
    5356
    5457    #region Properties
    55     public int ProblemSize {
     58    public int SolutionLength {
    5659      get { return ProblemSizeParameter.Value.Value; }
    5760      set { ProblemSizeParameter.Value.Value = value; }
    5861    }
    59     public int SolutionSize {
     62    public int Objectives {
    6063      get { return SolutionSizeParameter.Value.Value; }
    6164      set { SolutionSizeParameter.Value.Value = value; }
     
    7376    public override void Analyze(Individual[] individuals, double[][] qualities, ResultCollection results, IRandom random) {
    7477      base.Analyze(individuals, qualities, results, random);
    75       if (qualities[0].Length != 2) { throw new Exception(); }
    76       if (!results.ContainsKey("Hypervolume")) {
    77         results.Add(new Result("Hypervolume", typeof(DoubleValue)));
    78       }
    79       if (!results.ContainsKey("BestKnownHypervolume")) {
    80         results.Add(new Result("BestKnownHypervolume", typeof(DoubleValue)));
    81       }
    82       if (!results.ContainsKey("Absolute Distance to BestKnownHypervolume")) {
    83         results.Add(new Result("Absolute Distance to BestKnownHypervolume", typeof(DoubleValue)));
    84       }
    85       Hypervolume comp = new Hypervolume(TestFunction.ReferencePoint, Maximization);
    86       RealVector[] front = NonDominatedSelect.selectNonDominatedRows(qualities, Maximization, true);
    87 
    88       double hv = comp.GetHypervolume(front);
    89       double best = TestFunction.BestKnownHypervolume;
    90       results["Hypervolume"].Value = new DoubleValue(hv);
    91       results["BestKnownHypervolume"].Value = new DoubleValue(best);
    92       results["Absolute Distance to BestKnownHypervolume"].Value = new DoubleValue(best - hv);
     78      //if (qualities[0].Length != 2) { throw new Exception(); }
     79
     80
     81
     82
     83      IEnumerable<double[]> opf = null;
     84      try {
     85        opf = TestFunction.OptimalParetoFront(Objectives);
     86
     87        //Genearational Distance
     88        if (!results.ContainsKey("GenerationalDistance")) results.Add(new Result("GenerationalDistance", typeof(DoubleValue)));
     89        GenerationalDistance gd = new GenerationalDistance(1);
     90        results["GenerationalDistance"].Value = new DoubleValue(gd.Compare(qualities, opf));
     91
     92        //Inverted Generational Distance
     93        if (!results.ContainsKey("InvertedGenerationalDistance")) results.Add(new Result("InvertedGenerationalDistance", typeof(DoubleValue)));
     94        InvertedGenerationalDistance igd = new InvertedGenerationalDistance(1);
     95        results["InvertedGenerationalDistance"].Value = new DoubleValue(igd.Compare(qualities, opf));
     96
     97
     98      }
     99      catch (NotImplementedException) { } // only do this if the optimal Front is known
     100
     101
     102
     103      //Graphical analysis
     104      if (!results.ContainsKey("Front")) results.Add(new Result("Front", typeof(IMOQualities)));
     105      results["Front"].Value = new IMOSolution(qualities, individuals, opf, Objectives);
     106
     107
     108      //Hypervolume analysis
     109      if (!results.ContainsKey("Hypervolume")) results.Add(new Result("Hypervolume", typeof(DoubleValue)));
     110      IEnumerable<double[]> front = NonDominatedSelect.selectNonDominatedVectors(qualities, Maximization, true);
     111      if (!results.ContainsKey("BestKnownHypervolume")) results.Add(new Result("BestKnownHypervolume", typeof(DoubleValue)));
     112      if (!results.ContainsKey("Absolute Distance to BestKnownHypervolume")) results.Add(new Result("Absolute Distance to BestKnownHypervolume", typeof(DoubleValue)));
     113
     114
     115      if (Objectives == 2) { //Hypervolume analysis only with 2 objectives for now
     116        Hypervolume comp = new Hypervolume(TestFunction.ReferencePoint(Objectives), Maximization);
     117        try {
     118          double hv = comp.GetHypervolume(front);
     119          results["Hypervolume"].Value = new DoubleValue(hv);
     120          double best; double diff;
     121          if (TestFunction.BestKnownHypervolume(Objectives) > 0) {   // if best HV is known at all
     122            best = TestFunction.BestKnownHypervolume(Objectives);
     123            diff = best - hv;
     124            if (diff < 0) {  //replace best known Hypervolume
     125              diff = 0;
     126              best = hv;
     127            }
     128          } else {  //initalize best known Hypervolume
     129            best = hv;
     130            diff = 0;
     131          }
     132
     133          results["BestKnownHypervolume"].Value = new DoubleValue(best);
     134          results["Absolute Distance to BestKnownHypervolume"].Value = new DoubleValue(diff);
     135
     136        }
     137        catch (ArgumentException) {
     138          results["Hypervolume"].Value = new DoubleValue(Double.NaN);
     139        }
     140
     141      }
     142      //Experimental HV
     143      if(Objectives != 2) {
     144        FastHypervolume fcomp = new FastHypervolume(TestFunction.ReferencePoint(Objectives), Maximization);
     145        try {
     146          double hv = fcomp.GetHypervolume(front, TestFunction.Bounds(Objectives));
     147          results["Hypervolume"].Value = new DoubleValue(hv);
     148          double best; double diff;
     149          if (TestFunction.BestKnownHypervolume(Objectives) > 0) {   // if best HV is known at all
     150            best = TestFunction.BestKnownHypervolume(Objectives);
     151            diff = best - hv;
     152            if (diff < 0) {  //replace best known Hypervolume
     153              diff = 0;
     154              best = hv;
     155            }
     156          } else {  //initalize best known Hypervolume
     157            best = hv;
     158            diff = 0;
     159          }
     160
     161          results["BestKnownHypervolume"].Value = new DoubleValue(best);
     162          results["Absolute Distance to BestKnownHypervolume"].Value = new DoubleValue(diff);
     163        }
     164        catch (ArgumentException) {
     165          results["Hypervolume"].Value = new DoubleValue(Double.NaN);
     166        }
     167      }
     168
     169
     170      //Spacing analysis
     171      if (!results.ContainsKey("Spacing")) results.Add(new Result("Spacing", typeof(DoubleValue)));
     172      Spacing s = new Spacing();
     173      results["Spacing"].Value = new DoubleValue(s.Get(qualities));
     174
     175      //Crowding
     176      if (!results.ContainsKey("Crowding")) results.Add(new Result("Crowding", typeof(DoubleValue)));
     177      Crowding c = new Crowding(TestFunction.Bounds(Objectives));
     178      results["Crowding"].Value = new DoubleValue(c.Get(qualities));
     179
     180
     181
    93182    }
    94183
     
    112201      RegisterEventHandlers();
    113202    }
    114 
    115 
    116 
    117203    public override IDeepCloneable Clone(Cloner cloner) {
    118204      return new MultiObjectiveTestFunctionProblem(this, cloner);
    119205    }
    120 
    121206    [StorableHook(HookType.AfterDeserialization)]
    122207    private void AfterDeserialization() {
     
    132217
    133218    public double[] Evaluate(RealVector individual, IRandom random) {
    134       return TestFunction.Evaluate(individual);
     219      return TestFunction.Evaluate(individual, Objectives);
    135220    }
    136221
     
    139224    }
    140225
     226    public void Load(MOTFData data) {
     227      TestFunction = data.Evaluator;
     228    }
    141229
    142230    #region Events
     
    151239
    152240    private void TestFunctionParameterOnValueChanged(object sender, EventArgs eventArgs) {
    153       var problemSizeChange = ProblemSize < TestFunction.MinimumProblemSize
    154                               || ProblemSize > TestFunction.MaximumProblemSize;
     241      var problemSizeChange = SolutionLength < TestFunction.MinimumSolutionLength
     242                              || SolutionLength > TestFunction.MaximumSolutionLength;
    155243      if (problemSizeChange) {
    156         ProblemSize = Math.Max(TestFunction.MinimumProblemSize, Math.Min(ProblemSize, TestFunction.MaximumProblemSize));
    157       }
    158 
    159       var solutionSizeChange = SolutionSize < TestFunction.MinimumSolutionSize
    160                               || SolutionSize > TestFunction.MaximumSolutionSize;
     244        SolutionLength = Math.Max(TestFunction.MinimumSolutionLength, Math.Min(SolutionLength, TestFunction.MaximumSolutionLength));
     245      }
     246
     247      var solutionSizeChange = Objectives < TestFunction.MinimumObjectives
     248                              || Objectives > TestFunction.MaximumObjectives;
    161249      if (solutionSizeChange) {
    162         ProblemSize = Math.Max(TestFunction.MinimumSolutionSize, Math.Min(SolutionSize, TestFunction.MaximumSolutionSize));
    163       }
    164       Bounds = (DoubleMatrix)TestFunction.Bounds.Clone();
     250        SolutionLength = Math.Max(TestFunction.MinimumObjectives, Math.Min(Objectives, TestFunction.MaximumObjectives));
     251      }
     252      Bounds = (DoubleMatrix)new DoubleMatrix(TestFunction.Bounds(Objectives)).Clone();
    165253      OnReset();
    166254    }
    167255
    168256    private void ProblemSizeOnValueChanged(object sender, EventArgs eventArgs) {
    169       if (ProblemSize < TestFunction.MinimumProblemSize
    170         || ProblemSize > TestFunction.MaximumProblemSize)
    171         ProblemSize = Math.Min(TestFunction.MaximumProblemSize, Math.Max(TestFunction.MinimumProblemSize, ProblemSize));
    172       if (SolutionSize < TestFunction.MinimumSolutionSize
    173         || SolutionSize > TestFunction.MaximumSolutionSize)
    174         SolutionSize = Math.Min(TestFunction.MaximumSolutionSize, Math.Max(TestFunction.MinimumSolutionSize, SolutionSize));
    175       TestFunction.ActualSolutionSize = SolutionSize;
     257      if (SolutionLength < TestFunction.MinimumSolutionLength
     258        || SolutionLength > TestFunction.MaximumSolutionLength)
     259        SolutionLength = Math.Min(TestFunction.MaximumSolutionLength, Math.Max(TestFunction.MinimumSolutionLength, SolutionLength));
     260      if (Objectives < TestFunction.MinimumObjectives
     261        || Objectives > TestFunction.MaximumObjectives)
     262        Objectives = Math.Min(TestFunction.MaximumObjectives, Math.Max(TestFunction.MinimumObjectives, Objectives));
    176263    }
    177264
    178265    private void SolutionSizeOnValueChanged(object sender, EventArgs eventArgs) {
    179       if (SolutionSize < TestFunction.MinimumSolutionSize
    180         || SolutionSize > TestFunction.MaximumSolutionSize)
    181         SolutionSize = Math.Min(TestFunction.MaximumSolutionSize, Math.Max(TestFunction.MinimumSolutionSize, SolutionSize));
    182       TestFunction.ActualSolutionSize = SolutionSize;
    183       if (ProblemSize < TestFunction.MinimumProblemSize
    184         || ProblemSize > TestFunction.MaximumProblemSize)
    185         ProblemSize = Math.Min(TestFunction.MaximumProblemSize, Math.Max(TestFunction.MinimumProblemSize, ProblemSize));
     266      if (Objectives < TestFunction.MinimumObjectives
     267        || Objectives > TestFunction.MaximumObjectives)
     268        Objectives = Math.Min(TestFunction.MaximumObjectives, Math.Max(TestFunction.MinimumObjectives, Objectives));
     269      if (SolutionLength < TestFunction.MinimumSolutionLength
     270        || SolutionLength > TestFunction.MaximumSolutionLength)
     271        SolutionLength = Math.Min(TestFunction.MaximumSolutionLength, Math.Max(TestFunction.MinimumSolutionLength, SolutionLength));
    186272    }
    187273
     
    200286      //empty for now
    201287    }
    202 
    203288    #endregion
    204289  }
  • branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/NonDominatedSelect.cs

    r13562 r13620  
    2121
    2222using System.Collections.Generic;
     23using System.Linq;
    2324using HeuristicLab.Core;
    24 using HeuristicLab.Encodings.RealVectorEncoding;
    2525
    26 namespace HeuristicLab.Problems.MultiObjectiveTestFunction {
     26namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
    2727
    2828  public class NonDominatedSelect {
     
    3030
    3131
    32     public static RealVector[] selectNonDominatedVectors(RealVector[] qualities, bool[] maximization, bool dominateOnEqualQualities) {
    33       int populationSize = qualities.Length;
     32    public static IEnumerable<double[]> selectNonDominatedVectors(IEnumerable<double[]> qualities, bool[] maximization, bool dominateOnEqualQualities) {
     33      int populationSize = qualities.Count();
    3434
    35       List<RealVector> front = new List<RealVector>();
    36       foreach (RealVector row in qualities) {
     35      List<double[]> front = new List<double[]>();
     36      foreach (double[] row in qualities) {
    3737        bool insert = true;
    3838        for (int i = 0; i < front.Count; i++) {
     
    4444        }
    4545        if (insert) {
    46           front.Add(new RealVector(row));
     46          front.Add(row);
    4747        }
    4848      }
    4949
    50       return front.ToArray();
     50      return front;
    5151    }
    5252
    53     public static RealVector[] selectNonDominatedRows(double[][] qualities, bool[] maximization, bool dominateOnEqualQualities) {
    54       int populationSize = qualities.Length;
    55 
    56       List<RealVector> front = new List<RealVector>();
    57       foreach (double[] row in qualities) {
    58         bool insert = true;
    59         for (int i = 0; i < front.Count; i++) {
    60           DominationResult res = Dominates(front[i], row, maximization, dominateOnEqualQualities);
    61           if (res == DominationResult.Dominates) { insert = false; break; }           //Vector domiates Row
    62           else if (res == DominationResult.IsDominated) {   //Row dominates Vector
    63             front.RemoveRange(i, 1);
    64           }
    65         }
    66         if (insert) {
    67           front.Add(new RealVector(row));
    68         }
    69       }
    70 
    71       return front.ToArray();
    72     }
    73 
    74     private static DominationResult Dominates(RealVector left, double[] right, bool[] maximizations, bool dominateOnEqualQualities) {
    75       //mkommend Caution: do not use LINQ.SequenceEqual for comparing the two quality arrays (left and right) due to performance reasons
    76       if (dominateOnEqualQualities) {
    77         var equal = true;
    78         for (int i = 0; i < left.Length; i++) {
    79           if (left[i] != right[i]) {
    80             equal = false;
    81             break;
    82           }
    83         }
    84         if (equal) return DominationResult.Dominates;
    85       }
    86 
    87       bool leftIsBetter = false, rightIsBetter = false;
    88       for (int i = 0; i < left.Length; i++) {
    89         if (IsDominated(left[i], right[i], maximizations[i])) rightIsBetter = true;
    90         else if (IsDominated(right[i], left[i], maximizations[i])) leftIsBetter = true;
    91         if (leftIsBetter && rightIsBetter) break;
    92       }
    93 
    94       if (leftIsBetter && !rightIsBetter) return DominationResult.Dominates;
    95       if (!leftIsBetter && rightIsBetter) return DominationResult.IsDominated;
    96       return DominationResult.IsNonDominated;
    97     }
    98 
    99     private static DominationResult Dominates(RealVector left, RealVector right, bool[] maximizations, bool dominateOnEqualQualities) {
     53    private static DominationResult Dominates(double[] left, double[] right, bool[] maximizations, bool dominateOnEqualQualities) {
    10054      //mkommend Caution: do not use LINQ.SequenceEqual for comparing the two quality arrays (left and right) due to performance reasons
    10155      if (dominateOnEqualQualities) {
  • branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/PFReader.cs

    r13562 r13620  
    11using System;
    22using System.Collections.Generic;
    3 using System.IO;
    4 using System.Linq;
    5 using System.Text;
    6 using System.Threading.Tasks;
    7 using HeuristicLab.Encodings.RealVectorEncoding;
    83
    94namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
     
    116
    127    //TODO exception handling
    13     public static RealVector[] getFromFile(String filename) {
     8    public static IEnumerable<double[]> getFromFile(String filename) {
    149      double[] data = null;
    1510      switch (filename) {
    1611        case "Fonseca": data=new double[] { 0.000176662688, 0.9808196953, 0.0002622482087, 0.9804637139, 0.0004757736926, 0.9801036725, 0.0006892535714, 0.9797369958, 0.0009026878548, 0.9793635615, 0.001243925512, 0.9789859349, 0.001585046622, 0.9786013982, 0.001926051222, 0.9782098248, 0.002394641013, 0.9778139261, 0.002863010803, 0.9774108343, 0.003331160697, 0.977000419, 0.003926596353, 0.9765855441, 0.00452167628, 0.9761631856, 0.005116400691, 0.9757332084, 0.005838030675, 0.9752986372, 0.006559137231, 0.9748562836, 0.007279720739, 0.9744060083, 0.00812674948, 0.9739510039, 0.008973055502, 0.9734879105, 0.009818639422, 0.9730165844, 0.01079012882, 0.9725403942, 0.01176066507, 0.9720558005, 0.01273024911, 0.9715626548, 0.01382512033, 0.9710645104, 0.01491877735, 0.9705576398, 0.01601122151, 0.9700418902, 0.017228257, 0.9695210077, 0.01844378722, 0.9689910686, 0.01965781402, 0.9684519154, 0.02099565984, 0.967907496, 0.02233167993, 0.9673536817, 0.0236658768, 0.9667903103, 0.02512304517, 0.9662215409, 0.02657803872, 0.9656430303, 0.02803086072, 0.9650546119, 0.0296057328, 0.9644606651, 0.03117805314, 0.9638566234, 0.03274782586, 0.9632423151, 0.03443865486, 0.9626223504, 0.03612652816, 0.9619919293, 0.03781145094, 0.9613508752, 0.03961636531, 0.9607040392, 0.04141789396, 0.9600463777, 0.04321604321, 0.9593777095, 0.04513305022, 0.9587031367, 0.04704621631, 0.958017362, 0.0489555492, 0.9573201994, 0.05098253857, 0.956617013, 0.05300520776, 0.955902241, 0.05502356598, 0.9551756926, 0.05715831386, 0.9544430053, 0.05928823925, 0.9536983417, 0.06141335303, 0.952941506, 0.06365352609, 0.9521784208, 0.06588835242, 0.9514029616, 0.06811784477, 0.9506149279, 0.07046100449, 0.9498205391, 0.07279827248, 0.949013372, 0.07512966355, 0.9481932211, 0.07757327066, 0.9473666151, 0.0800104215, 0.9465268202, 0.08244113312, 0.9456736259, 0.08498255227, 0.9448138827, 0.0875169323, 0.9439405335, 0.09004429269, 0.9430533632, 0.0926807972, 0.942159557, 0.09530966269, 0.941251722, 0.09793091132, 0.9403296381, 0.1006596881, 0.9394008389, 0.1033802102, 0.9384575824, 0.1060925027, 0.9374996436, 0.1089106573, 0.9365349181, 0.1117199272, 0.9355553016, 0.1145203405, 0.9345605641, 0.1174249021, 0.9335589774, 0.1203199361, 0.9325420608, 0.1232054737, 0.9315095798, 0.1261934006, 0.9304701964, 0.1291711452, 0.9294150398, 0.1321387424, 0.9283438706, 0.1352069272, 0.9272657562, 0.1382642649, 0.926171421, 0.1413107939, 0.9250606207, 0.1444560691, 0.9239428437, 0.1475898234, 0.9228083941, 0.1507120992, 0.9216570234, 0.1539312422, 0.920498656, 0.1571381834, 0.9193231611, 0.1603329689, 0.9181302855, 0.1636227081, 0.9169304058, 0.1668995584, 0.9157129408, 0.1701635703, 0.9144776326, 0.1735205902, 0.9132353263, 0.1768640296, 0.9119749742, 0.1801939435, 0.9106963141, 0.1836148905, 0.9094106763, 0.1870215624, 0.9081065301, 0.1904140186, 0.906783609, 0.1938955065, 0.9054537456, 0.1973620229, 0.9041049098, 0.2008136321, 0.9027368309, 0.2043522477, 0.901361861, 0.2078751951, 0.8999674536, 0.2113825437, 0.8985533341, 0.2149748521, 0.8971323917, 0.218550797, 0.8956915464, 0.2221104526, 0.8942305195, 0.2257530033, 0.8927627555, 0.2293784974, 0.8912746234, 0.2329870147, 0.8897658404, 0.2366763464, 0.8882504249, 0.2403479324, 0.8867141766, 0.2440018582, 0.8851568092, 0.2477345046, 0.8835929333, 0.2514487216, 0.8820077613, 0.2551446002, 0.8804010033, 0.2589170954, 0.8787878814, 0.262670484, 0.8771530021, 0.2664048626, 0.875496072, 0.2702137463, 0.873832944, 0.2740028539, 0.8721475999, 0.2777722882, 0.8704397429, 0.2816141105, 0.8687258765, 0.2854354966, 0.8669893384, 0.2892365553, 0.8652298289, 0.2931078825, 0.8634645216, 0.2969581237, 0.8616760912, 0.3007873938, 0.8598642348, 0.3046848129, 0.8580468166, 0.3085605078, 0.8562058284, 0.3124145995, 0.8543409645, 0.3163347232, 0.8524708001, 0.3202324971, 0.8505766241, 0.3241080487, 0.8486581281, 0.3280475201, 0.8467346191, 0.3319640301, 0.8447866629, 0.3358577125, 0.8428139488, 0.3398132097, 0.8408365364, 0.3437451487, 0.8388342479, 0.3476536699, 0.8368067705, 0.3516219105, 0.8347749374, 0.3555660121, 0.832717807, 0.3594861217, 0.8306350644, 0.3634638669, 0.8285483379, 0.3674169094, 0.8264359011, 0.3713454026, 0.8242974371, 0.3753294618, 0.822155391, 0.3792882723, 0.8199872304, 0.3832219941, 0.8177926372, 0.3872092284, 0.8155948943, 0.3911706867, 0.8133706427, 0.3951065358, 0.8111195628, 0.399093862, 0.8088657975, 0.4030549046, 0.8065851399, 0.4069898368, 0.8042772689, 0.410974231, 0.8019672096, 0.4149318543, 0.7996298854, 0.4188628866, 0.7972649745, 0.4228413876, 0.7948984058, 0.4267926516, 0.7925042117, 0.4307168649, 0.7900820697, 0.4346865776, 0.7876588349, 0.4386286088, 0.7852076269, 0.4425431514, 0.7827281229, 0.4465012497, 0.7802481262, 0.4504312444, 0.7777398222, 0.454333335, 0.7752028877, 0.4582770646, 0.7726660967, 0.4621922915, 0.7701006784, 0.4660792217, 0.7675063099, 0.4700059031, 0.7649127576, 0.4739037061, 0.7622902733, 0.477772843, 0.7596385341, 0.4816798738, 0.7569883214, 0.4855576743, 0.7543088875, 0.4894064631, 0.7515999103, 0.4932913201, 0.7488932079, 0.4971466191, 0.7461570117, 0.500972585, 0.7433910004, 0.5048328265, 0.7406280509, 0.508663207, 0.7378353523, 0.5124639575, 0.7350125843, 0.516297225, 0.7321937045, 0.5201003534, 0.7293448381, 0.5238735795, 0.726465666, 0.5276775997, 0.7235912484, 0.5314512276, 0.7206866253, 0.535194706, 0.7177514791, 0.5389672918, 0.7148219942, 0.5427092575, 0.7118621039, 0.5464208515, 0.7088714927, 0.5501599037, 0.7058874904, 0.5538681332, 0.7028729027, 0.5575457942, 0.6998274162, 0.5612493022, 0.6967895276, 0.5649218105, 0.6937208941, 0.5685635786, 0.6906212045, 0.5722296217, 0.6875301434, 0.5758645135, 0.6844081988, 0.5794685184, 0.6812550624, 0.5830952663, 0.6781116267, 0.5866907364, 0.6749371907, 0.5902551984, 0.6717314487, 0.5938409115, 0.668536522, 0.5973952457, 0.6653105001, 0.6009184756, 0.6620530805, 0.6044615056, 0.6588076329, 0.6079730807, 0.6555310179, 0.6114534802, 0.6522229362, 0.61495227, 0.6489280257, 0.618419554, 0.6456018985, 0.6218556156, 0.6422442589, 0.6253086998, 0.638901032, 0.6287302515, 0.6355265626, 0.6321205588, 0.6321205588, 0.6355265626, 0.6287302515, 0.638901032, 0.6253086998, 0.6422442589, 0.6218556156, 0.6456018985, 0.618419554, 0.6489280257, 0.61495227, 0.6522229362, 0.6114534802, 0.6555310179, 0.6079730807, 0.6588076329, 0.6044615056, 0.6620530805, 0.6009184756, 0.6653105001, 0.5973952457, 0.668536522, 0.5938409115, 0.6717314487, 0.5902551984, 0.6749371907, 0.5866907364, 0.6781116267, 0.5830952663, 0.6812550624, 0.5794685184, 0.6844081988, 0.5758645135, 0.6875301434, 0.5722296217, 0.6906212045, 0.5685635786, 0.6937208941, 0.5649218105, 0.6967895276, 0.5612493022, 0.6998274162, 0.5575457942, 0.7028729027, 0.5538681332, 0.7058874904, 0.5501599037, 0.7088714927, 0.5464208515, 0.7118621039, 0.5427092575, 0.7148219942, 0.5389672918, 0.7177514791, 0.535194706, 0.7206866253, 0.5314512276, 0.7235912484, 0.5276775997, 0.726465666, 0.5238735795, 0.7293448381, 0.5201003534, 0.7321937045, 0.516297225, 0.7350125843, 0.5124639575, 0.7378353523, 0.508663207, 0.7406280509, 0.5048328265, 0.7433910004, 0.500972585, 0.7461570117, 0.4971466191, 0.7488932079, 0.4932913201, 0.7515999103, 0.4894064631, 0.7543088875, 0.4855576743, 0.7569883214, 0.4816798738, 0.7596385341, 0.477772843, 0.7622902733, 0.4739037061, 0.7649127576, 0.4700059031, 0.7675063099, 0.4660792217, 0.7701006784, 0.4621922915, 0.7726660967, 0.4582770646, 0.7752028877, 0.454333335, 0.7777398222, 0.4504312444, 0.7802481262, 0.4465012497, 0.7827281229, 0.4425431514, 0.7852076269, 0.4386286088, 0.7876588349, 0.4346865776, 0.7900820697, 0.4307168649, 0.7925042117, 0.4267926516, 0.7948984058, 0.4228413876, 0.7972649745, 0.4188628866, 0.7996298854, 0.4149318543, 0.8019672096, 0.410974231, 0.8042772689, 0.4069898368, 0.8065851399, 0.4030549046, 0.8088657975, 0.399093862, 0.8111195628, 0.3951065358, 0.8133706427, 0.3911706867, 0.8155948943, 0.3872092284, 0.8177926372, 0.3832219941, 0.8199872304, 0.3792882723, 0.822155391, 0.3753294618, 0.8242974371, 0.3713454026, 0.8264359011, 0.3674169094, 0.8285483379, 0.3634638669, 0.8306350644, 0.3594861217, 0.832717807, 0.3555660121, 0.8347749374, 0.3516219105, 0.8368067705, 0.3476536699, 0.8388342479, 0.3437451487, 0.8408365364, 0.3398132097, 0.8408365364, 0.3398132097, 0.8428139488, 0.3358577125, 0.8447866629, 0.3319640301, 0.8467346191, 0.3280475201, 0.8486581281, 0.3241080487, 0.8505766241, 0.3202324971, 0.8524708001, 0.3163347232, 0.8543409645, 0.3124145995, 0.8562058284, 0.3085605078, 0.8580468166, 0.3046848129, 0.8598642348, 0.3007873938, 0.8616760912, 0.2969581237, 0.8634645216, 0.2931078825, 0.8652298289, 0.2892365553, 0.8669893384, 0.2854354966, 0.8687258765, 0.2816141105, 0.8704397429, 0.2777722882, 0.8721475999, 0.2740028539, 0.873832944, 0.2702137463, 0.875496072, 0.2664048626, 0.8771530021, 0.262670484, 0.8787878814, 0.2589170954, 0.8804010033, 0.2551446002, 0.8820077613, 0.2514487216, 0.8835929333, 0.2477345046, 0.8851568092, 0.2440018582, 0.8867141766, 0.2403479324, 0.8882504249, 0.2366763464, 0.8897658404, 0.2329870147, 0.8912746234, 0.2293784974, 0.8927627555, 0.2257530033, 0.8942305195, 0.2221104526, 0.8956915464, 0.218550797, 0.8971323917, 0.2149748521, 0.8985533341, 0.2113825437, 0.8999674536, 0.2078751951, 0.901361861, 0.2043522477, 0.9027368309, 0.2008136321, 0.9041049098, 0.1973620229, 0.9054537456, 0.1938955065, 0.906783609, 0.1904140186, 0.9081065301, 0.1870215624, 0.9094106763, 0.1836148905, 0.9106963141, 0.1801939435, 0.9119749742, 0.1768640296, 0.9132353263, 0.1735205902, 0.9144776326, 0.1701635703, 0.9157129408, 0.1668995584, 0.9169304058, 0.1636227081, 0.9181302855, 0.1603329689, 0.9193231611, 0.1571381834, 0.920498656, 0.1539312422, 0.9216570234, 0.1507120992, 0.9228083941, 0.1475898234, 0.9239428437, 0.1444560691, 0.9250606207, 0.1413107939, 0.926171421, 0.1382642649, 0.9272657562, 0.1352069272, 0.9283438706, 0.1321387424, 0.9294150398, 0.1291711452, 0.9304701964, 0.1261934006, 0.9315095798, 0.1232054737, 0.9325420608, 0.1203199361, 0.9335589774, 0.1174249021, 0.9345605641, 0.1145203405, 0.9355553016, 0.1117199272, 0.9365349181, 0.1089106573, 0.9374996436, 0.1060925027, 0.9384575824, 0.1033802102, 0.9394008389, 0.1006596881, 0.9403296381, 0.09793091132, 0.941251722, 0.09530966269, 0.942159557, 0.0926807972, 0.9430533632, 0.09004429269, 0.9439405335, 0.0875169323, 0.9448138827, 0.08498255227, 0.9456736259, 0.08244113312, 0.9465268202, 0.0800104215, 0.9473666151, 0.07757327066, 0.9481932211, 0.07512966355, 0.949013372, 0.07279827248, 0.9498205391, 0.07046100449, 0.9506149279, 0.06811784477, 0.9514029616, 0.06588835242, 0.9521784208, 0.06365352609, 0.952941506, 0.06141335303, 0.9536983417, 0.05928823925, 0.9544430053, 0.05715831386, 0.9551756926, 0.05502356598, 0.955902241, 0.05300520776, 0.956617013, 0.05098253857, 0.9573201994, 0.0489555492, 0.958017362, 0.04704621631, 0.9587031367, 0.04513305022, 0.9593777095, 0.04321604321, 0.9600463777, 0.04141789396, 0.9607040392, 0.03961636531, 0.9613508752, 0.03781145094, 0.9619919293, 0.03612652816, 0.9626223504, 0.03443865486, 0.9632423151, 0.03274782586, 0.9638566234, 0.03117805314, 0.9644606651, 0.0296057328, 0.9650546119, 0.02803086072, 0.9656430303, 0.02657803872, 0.9662215409, 0.02512304517, 0.9667903103, 0.0236658768, 0.9673536817, 0.02233167993, 0.967907496, 0.02099565984, 0.9684519154, 0.01965781402, 0.9689910686, 0.01844378722, 0.9695210077, 0.017228257, 0.9700418902, 0.01601122151, 0.9705576398, 0.01491877735, 0.9710645104, 0.01382512033, 0.9715626548, 0.01273024911, 0.9720558005, 0.01176066507, 0.9725403942, 0.01079012882, 0.9730165844, 0.009818639422, 0.9734879105, 0.008973055502, 0.9739510039, 0.00812674948, 0.9744060083, 0.007279720739, 0.9748562836, 0.006559137231, 0.9752986372, 0.005838030675, 0.9757332084, 0.005116400691, 0.9761631856, 0.00452167628, 0.9765855441, 0.003926596353, 0.977000419, 0.003331160697, 0.9774108343, 0.002863010803, 0.9778139261, 0.002394641013, 0.9782098248, 0.001926051222, 0.9786013982, 0.001585046622, 0.9789859349, 0.001243925512, 0.9793635615, 0.0009026878548, 0.9797369958, 0.0006892535714, 0.9801036725, 0.0004757736926, 0.9804637139, 0.0002622482087, 0.9808196953, 0.000176662688, 0.9811691901, 9.106984058e-05, 0.9815123166, 5.469665695e-06, 5.469665695e-06, 0.9815123166, 9.106984058e-05, 0.9811691901, }; break;
    17         case "Kursawe": data = new double[] { -20, 8.180035271e-11, -19.01225297, -0.1080697151, -19.03029552, -0.07779104234, -19.04837418, -0.04902448937, -19.06648904, -0.02174786463, -19.06648904, -0.02174786463, -18.00915364, -3.810091895, -18.00915364, -3.810091895, -18.02518798, -3.777701496, -18.02518798, -3.777701496, -18.04125442, -3.739708509, -18.05735302, -3.696507436, -18.05735302, -3.696507436, -18.07348385, -3.648483493, -18.07348385, -3.648483493, -18.08964698, -3.59601178, -18.10584246, -3.53945657, -18.12207037, -3.479170725, -18.13833076, -3.415495219, -18.15462371, -3.348758763, -18.15462371, -3.348758763, -18.17094928, -3.279277522, -18.17094928, -3.279277522, -18.18730753, -3.207354924, -18.20369853, -3.133281537, -18.22012235, -3.057335028, -18.23657904, -2.979780177, -18.25306868, -2.900868953, -18.25306868, -2.900868953, -18.26959134, -2.820840641, -18.26959134, -2.820840641, -18.28614707, -2.739922013, -18.30273595, -2.658327536, -18.31935804, -2.576259622, -18.3360134, -2.4939089, -18.35270211, -2.411454518, -18.36942423, -2.329064462, -18.38617983, -2.246895899, -18.38617983, -2.246895899, -18.40296898, -2.165095526, -18.40296898, -2.165095526, -18.41979173, -2.083799937, -18.43664817, -2.00313599, -18.45353835, -1.923221187, -18.47046234, -1.84416405, -18.48742022, -1.766064503, -18.50441205, -1.68901425, -18.52143789, -1.61309715, -18.53849782, -1.538389585, -18.5555919, -1.464960831, -18.57272021, -1.392873411, -18.58988281, -1.322183448, -18.60707976, -1.252941004, -18.62431115, -1.185190416, -18.64157703, -1.118970613, -18.65887748, -1.054315433, -18.67621256, -0.9912539178, -18.69358235, -0.9298106093, -18.71098692, -0.870005823, -18.71098692, -0.870005823, -18.72842632, -0.8118559173, -18.74590065, -0.7553735491, -18.74590065, -0.7553735491, -18.76340995, -0.7005679181, -18.78095431, -0.6474450005, -18.79853379, -0.5960077704, -18.79853379, -0.5960077704, -18.81614847, -0.5462564117, -18.83379841, -0.4981885184, -18.85148369, -0.4517992843, -18.86920437, -0.4070816833, -18.88696053, -0.3640266386, -18.90475223, -0.3226231835, -18.92257956, -0.2828586119, -18.94044258, -0.2447186203, -18.94044258, -0.2447186203, -18.95834135, -0.2081874415, -18.97627596, -0.1732479687, -18.97627596, -0.1732479687, -18.99424648, -0.1398818735, -17.00146394, -3.950949465, -17.00340012, -3.949973769, -17.00540432, -3.944546604, -17.00747653, -3.934237505, -17.00961678, -3.918609163, -17.02140662, -3.91816161, -17.02344686, -3.914267931, -17.0255552, -3.905470952, -17.02773164, -3.891332538, -17.03944916, -3.887882937, -17.04152552, -3.885501378, -17.04367005, -3.878194327, -17.94533603, -3.875471082, -17.9612426, -3.869584673, -17.97718102, -3.856446463, -17.99315134, -3.836476889, -16.00230499, -7.646568784, -16.002369, -7.634147959, -16.01830729, -7.62018379, -16.01833932, -7.614178385, -16.01843543, -7.596154972, -16.03434162, -7.587793392, -16.03440576, -7.576185398, -16.05037596, -7.555402993, -16.05040806, -7.549800405, -16.05050436, -7.532984325, -16.0664424, -7.517410006, -16.06650666, -7.506599331, -16.06663519, -7.484960382, -16.08250883, -7.479417019, -16.082541, -7.474208933, -16.08263749, -7.458575388, -16.09860744, -7.436215946, -16.09867183, -7.42618499, -16.09880062, -7.406103675, -16.11470604, -7.393014872, -16.11473827, -7.388192003, -16.11483496, -7.373713276, -16.1149961, -7.349548465, -16.13083687, -7.34499093, -16.13090139, -7.335720289, -16.13103044, -7.317158066, -16.1469677, -7.296966987, -16.14699999, -7.292519216, -16.14709688, -7.279165079, -16.14725835, -7.256872221, -16.16313083, -7.244495273, -16.16319548, -7.235964006, -16.16332478, -7.218879234, -16.16351874, -7.193196715, -16.17929395, -7.19202356, -16.17932631, -7.187940063, -16.17942339, -7.175678161, -16.17958518, -7.155203728, -16.19548944, -7.13546835, -16.19555422, -7.127654218, -16.19568378, -7.112002655, -16.19587813, -7.088467272, -16.21168492, -7.078913139, -16.21171734, -7.075182505, -16.21181461, -7.063978712, -16.21197673, -7.045266199, -16.2122037, -7.018986032, -16.22791283, -7.018627294, -16.22797774, -7.011506999, -16.22810756, -6.997242256, -16.2283023, -6.975784958, -16.24414073, -6.958341449, -16.24417322, -6.954951788, -16.24427069, -6.944770543, -16.24443313, -6.927761016, -16.24466055, -6.90386236, -16.26040113, -6.894665943, -16.26046617, -6.888215332, -16.26059626, -6.875289302, -16.26079138, -6.855838417, -16.27666153, -6.830990438, -16.27669408, -6.827929487, -16.27679174, -6.818734092, -16.27695451, -6.803366704, -16.27718238, -6.781765031, -16.29295447, -6.764253981, -16.29301965, -6.758448247, -16.29314999, -6.746811494, -16.29334551, -6.729293317, -16.2936062, -6.705818522, -16.30924742, -6.697517525, -16.30928004, -6.694772741, -16.3093779, -6.686525649, -16.30954099, -6.672738107, -16.30976932, -6.653346808, -16.31006289, -6.62826367, -16.32557299, -6.628036285, -16.32563829, -6.622850143, -16.3257689, -6.612452262, -16.32596481, -6.596791598, -16.32622602, -6.575791957, -16.34189856, -6.558555045, -16.34193124, -6.556113687, -16.34202929, -6.548776756, -16.34219271, -6.536505753, -16.3424215, -6.519236746, -16.34271566, -6.496880733, -16.35825681, -6.486632446, -16.35832224, -6.4820403, -16.35845311, -6.472830247, -16.35864941, -6.458950901, -16.35891114, -6.440325523, -16.35923832, -6.416852421, -16.37461506, -6.414709848, -16.37464781, -6.41255906, -16.37474606, -6.406093791, -16.37490981, -6.395275396, -16.37513905, -6.380039678, -16.3754338, -6.360297211, -16.39100606, -6.340636461, -16.39107163, -6.33661255, -16.39120275, -6.328538939, -16.39139945, -6.316364172, -16.39166171, -6.300011366, -16.39198953, -6.279378582, -16.40739706, -6.266563075, -16.40742988, -6.264689952, -16.40752832, -6.259057699, -16.4076924, -6.249627716, -16.4079221, -6.23633586, -16.40821744, -6.219092737, -16.40857841, -6.197784106, -16.42382088, -6.190616565, -16.42388657, -6.187135101, -16.42401796, -6.180146475, -16.42421505, -6.169599404, -16.42447784, -6.155417232, -16.42480632, -6.137498261, -16.4252005, -6.115716192, -16.44024469, -6.114670056, -16.44027757, -6.113061714, -16.44037622, -6.108223877, -16.44054062, -6.100118163, -16.44077078, -6.088680775, -16.44106671, -6.073822755, -16.44142841, -6.055430347, -16.45670139, -6.037115205, -16.45676722, -6.03415049, -16.45689887, -6.028195565, -16.45709635, -6.019199535, -16.45735966, -6.007086299, -16.4576888, -5.991754841, -16.45808377, -5.973079625, -16.47315809, -5.959560354, -16.47319103, -5.958203981, -16.47328987, -5.954122178, -16.4734546, -5.947276937, -16.47368523, -5.937605058, -16.47398175, -5.925018385, -16.47434417, -5.909404119, -16.47477248, -5.890625242, -16.48964773, -5.88064913, -16.48971369, -5.878175669, -16.4898456, -5.87320355, -16.49004348, -5.86568246, -16.49030732, -5.855537144, -16.49063712, -5.842667663, -16.49103288, -5.826949736, -16.4914946, -5.808235186, -16.50613737, -5.801737906, -16.50617038, -5.800620818, -16.50626942, -5.797257041, -16.50643448, -5.791609073, -16.50666557, -5.783614546, -16.50696268, -5.773186422, -16.50732583, -5.76021328, -16.507755, -5.744559681, -16.5082502, -5.726066623, -16.52266002, -5.721709594, -16.52272612, -5.719702189, -16.5228583, -5.715662564, -16.52305657, -5.709541159, -16.52332093, -5.701263824, -16.52365139, -5.69073204, -16.52404795, -5.677823224, -16.5245106, -5.662391118, -16.52503934, -5.644266251, -16.53918268, -5.641681282, -16.53921576, -5.640790966, -16.53931499, -5.638107713, -16.53948039, -5.63359465, -16.53971194, -5.627190437, -16.54000964, -5.618809442, -16.54037351, -5.608341984, -16.54080355, -5.595654661, -16.54129974, -5.580590745, -16.5418621, -5.562970662, -16.55573841, -5.560762654, -16.55580463, -5.559196489, -16.55593708, -5.556039799, -16.55613575, -5.551243928, -16.55640065, -5.544736055, -16.55673177, -5.536419386, -16.55712911, -5.526173421, -16.55759269, -5.513854289, -16.55812249, -5.499295156, -16.55871853, -5.482306715, -16.57229414, -5.479844025, -16.57232729, -5.479168177, -16.57242672, -5.477128575, -16.57259245, -5.473689077, -16.57282446, -5.468789546, -16.57312277, -5.462345999, -16.57348736, -5.454250823, -16.57391826, -5.444373049, -16.57441544, -5.4325587, -16.57497893, -5.418631209, -16.57560871, -5.402391911, -16.58888302, -5.398249549, -16.58894938, -5.397100263, -16.58908209, -5.394777853, -16.58928116, -5.391234694, -16.58954658, -5.38639949, -16.58987836, -5.380177436, -16.59027651, -5.37245045, -16.59074101, -5.363077459, -16.59127188, -5.351894753, -16.59186911, -5.338716406, -16.59253271, -5.323334774, -16.6054719, -5.316655072, -16.60550511, -5.316181635, -16.60560474, -5.314749541, -16.6057708, -5.312323471, -16.60600328, -5.308844639, -16.60630218, -5.304230927, -16.60666751, -5.298377064, -16.60709926, -5.291154861, -16.60759745, -5.282413512, -16.60816206, -5.271979949, -16.6087931, -5.259659269, -16.60949059, -5.245235228, -16.62209399, -5.234587158, -16.62216048, -5.233830913, -16.62229345, -5.232295159, -16.62249292, -5.229933415, -16.62275888, -5.226676076, -16.62309132, -5.222430554, -16.62349026, -5.217081474, -16.6239557, -5.210490914, -16.62448763, -5.202498709, -16.62508605, -5.192922812, -16.62575098, -5.181559722, -16.62648241, -5.168184975, -16.62728035, -5.152553719, -16.63871608, -5.152519244, -16.63874935, -5.152236436, -16.63884919, -5.15137653, -16.63901557, -5.149905103, -16.63924852, -5.147764852, -16.63954802, -5.144875703, -16.63991408, -5.141134965, -16.6403467, -5.136417527, -16.64084588, -5.130576111, -16.64141162, -5.123441572, -16.64204393, -5.114823266, -16.64274281, -5.104509469, -16.64350826, -5.092267874, -16.64434028, -5.077846155, -16.65537144, -5.070168522, -16.65543806, -5.069782054, -16.65557131, -5.068986474, -16.65577117, -5.06773654, -16.65603766, -5.065964479, -16.65637077, -5.063580114, -16.65677051, -5.060471018, -16.65723688, -5.056502724, -16.65776987, -5.051518974, -16.6583695, -5.045342025, -16.65903576, -5.037773013, -16.65976865, -5.028592369, -16.66056819, -5.01756031, -16.66143436, -5.004417401, -16.66236719, -4.988885191, -16.67202681, -4.9878178, -16.67206015, -4.98771414, -16.67216018, -4.987391998, -16.67232691, -4.986817911, -16.67256032, -4.985936167, -16.67286042, -4.98466889, -16.67322721, -4.982916167, -16.67366069, -4.980556215, -16.67416087, -4.977445587, -16.67472775, -4.973419427, -16.67536132, -4.968291773, -16.6760616, -4.961855912, -16.67682858, -4.953884804, -16.67766227, -4.944131556, -16.67856267, -4.932329981, -16.67952978, -4.918195228, -16.68871552, -4.905363418, -16.68878227, -4.905324084, -16.68891578, -4.905223435, -16.68911605, -4.905017539, -16.68938307, -4.904640578, -16.68971685, -4.904004943, -16.69011739, -4.903001364, -16.69058469, -4.901499078, -16.69111875, -4.89934604, -16.69171958, -4.896369174, -16.69238717, -4.892374672, -16.69312153, -4.887148348, -16.69392267, -4.88045605, -16.69479058, -4.872044136, -16.69572527, -4.861640018, -16.69672674, -4.848952784, -16.697795, -4.83367391, -16.70660703, -4.82409014, -16.70704138, -4.823944227, -16.70754257, -4.823399531, -16.70811058, -4.822295788, -16.70874542, -4.820452074, -16.7094471, -4.817667107, -16.71021562, -4.813719594, -16.71105097, -4.80836863, -16.71195317, -4.801354173, -16.71292222, -4.792397574, -16.71395813, -4.781202196, -16.71506088, -4.767454107, -16.7162305, -4.750822869, -16.72513642, -4.746378687, -16.72580535, -4.745744509, -16.72654118, -4.744238354, -16.72734392, -4.741632174, -16.72821357, -4.737678667, -16.72915013, -4.732111729, -16.73015361, -4.724646986, -16.73122401, -4.714982393, -16.73236133, -4.702798926, -16.73236133, -4.702798926, -16.73356558, -4.687761354, -16.74289943, -4.672315755, -16.74366949, -4.672150934, -16.74450652, -4.670942211, -16.74541053, -4.668436223, -16.74638152, -4.664361141, -16.74741949, -4.658427183, -16.74852446, -4.650327213, -16.74969642, -4.639737411, -16.75093537, -4.626318045, -16.75224133, -4.609714333, -16.76170348, -4.601699767, -16.76264191, -4.600685635, -16.7636474, -4.598141338, -16.76471994, -4.593772002, -16.76585954, -4.587265698, -16.7670662, -4.578294103, -16.76833994, -4.566513259, -16.76968074, -4.551564427, -16.77990779, -4.534465832, -16.78094785, -4.533486157, -16.78205502, -4.530710488, -16.78322933, -4.525822389, -16.78447077, -4.518489316, -16.78577934, -4.508363353, -16.78715506, -4.495082059, -16.78859793, -4.478269415, -16.79828293, -4.470424643, -16.79828293, -4.470424643, -16.79942481, -4.469267179, -16.80063389, -4.466017603, -16.80191018, -4.460339411, -16.80325366, -4.451880985, -16.80466437, -4.440276428, -16.80614229, -4.425146497, -16.80614229, -4.425146497, -16.81682938, -4.409462393, -16.8180733, -4.407867697, -16.8193845, -4.403857043, -16.82076297, -4.397075354, -16.82220873, -4.38715351, -16.82372177, -4.373709267, -16.82530211, -4.356348307, -16.83554762, -4.351385329, -16.8368938, -4.349051412, -16.83830733, -4.343952437, -16.83978821, -4.33571628, -16.84133645, -4.323957908, -16.84295205, -4.308280414, -16.85305693, -4.296579698, -16.85443816, -4.295928494, -16.85443816, -4.295928494, -16.85588681, -4.292515207, -16.85740288, -4.285964921, -16.85898639, -4.275890015, -16.86063733, -4.261891179, -16.87201764, -4.244491264, -16.87350149, -4.242763848, -16.87505283, -4.237897028, -16.87667166, -4.229500781, -16.87835801, -4.217173578, -16.88011187, -4.200503527, -16.88963232, -4.194739905, -16.89115143, -4.194695955, -16.8927381, -4.191507794, -16.89439235, -4.18478318, -16.89611417, -4.174118534, -16.89790358, -4.159100072, -16.9088367, -4.14830672, -16.91045878, -4.146790193, -16.91214851, -4.141728135, -16.91390588, -4.132715079, -16.9157309, -4.119335501, -16.92821494, -4.103735148, -16.92994021, -4.10032468, -16.9317332, -4.092950507, -16.93359392, -4.081195509, -16.93552237, -4.064633904, -16.94600665, -4.062331693, -16.94776754, -4.060560108, -16.94959622, -4.054810515, -16.9514927, -4.04466433, -16.95345698, -4.029694431, -16.96383398, -4.022567121, -16.96563055, -4.022420117, -16.967495, -4.018279337, -16.96942731, -4.009724858, -16.9714275, -3.996328336, -16.98352933, -3.985888938, -16.98542961, -3.983339864, -16.98739782, -3.976358762, -16.98943399, -3.964516178, -15.0001297, -10.21385551, -15.00263349, -10.19783594, -15.00855446, -10.17613796, -15.01137813, -10.16583157, -15.01378531, -10.14536423, -15.01675233, -10.13774455, -15.01989795, -10.13293688, -15.02262656, -10.11780763, -15.02816253, -10.09454348, -15.03121332, -10.08491294, -15.03384551, -10.06533591, -15.03619769, -10.05567664, -15.03957273, -10.05134241, -15.04252869, -10.036889, -15.04506446, -10.0128642, -15.04767481, -10.01247557, -15.05095527, -10.00331847, -15.05381503, -9.984417286, -15.05554495, -9.973325919, -15.05915193, -9.969274494, -15.06233781, -9.955294523, -15.06510137, -9.931945573, -15.06708919, -9.930124846, -15.07060187, -9.921250552, -15.07369178, -9.902822809, -15.07479198, -9.890871537, -15.07863344, -9.886923772, -15.0820518, -9.873226609, -15.08504576, -9.850351096, -15.08640354, -9.847670463, -15.09015099, -9.83889983, -15.09347365, -9.820754895, -15.09393662, -9.808481481, -15.09801511, -9.80446939, -15.10166854, -9.790875887, -15.1048955, -9.768283182, -15.10561569, -9.765280407, -15.10960048, -9.756445447, -15.11315849, -9.738404174, -15.11729476, -9.722079334, -15.12118584, -9.708421504, -15.12464843, -9.68593246, -15.12472345, -9.683111844, -15.12894815, -9.674055391, -15.13274411, -9.655949791, -15.13647021, -9.639910771, -15.14060154, -9.626031449, -15.14430238, -9.603478078, -15.1481918, -9.591886828, -15.15222833, -9.573559735, -15.15553921, -9.558110399, -15.15583263, -9.546922867, -15.15991339, -9.543862886, -15.16385513, -9.521088022, -15.16732918, -9.510086456, -15.17160891, -9.491391172, -15.17449952, -9.476814809, -15.17545441, -9.464532811, -15.17911916, -9.462062513, -15.18139811, -9.439351936, -15.18330444, -9.438919459, -15.18635804, -9.428790867, -15.1908836, -9.4095908, -15.19334885, -9.396150862, -15.19497297, -9.382364248, -15.19821656, -9.380766924, -15.20006589, -9.359437132, -15.20264804, -9.357119086, -15.20527608, -9.34812692, -15.2100501, -9.328295211, -15.21208491, -9.316236059, -15.21438602, -9.300563876, -15.2172033, -9.300102977, -15.21861792, -9.280379995, -15.22188363, -9.275823497, -15.22408097, -9.268212116, -15.2291061, -9.247631264, -15.23070534, -9.237178922, -15.23607704, -9.220188174, -15.23705188, -9.202280449, -15.24100889, -9.19515955, -15.24277038, -9.189154979, -15.24314087, -9.16843127, -15.24804925, -9.16771646, -15.24920779, -9.159079375, -15.25483543, -9.141131037, -15.25536538, -9.125230196, -15.26002147, -9.115244747, -15.26134193, -9.111055433, -15.2668772, -9.088659323, -15.26758989, -9.082029123, -15.27347607, -9.06303149, -15.27355602, -9.049313095, -15.27891897, -9.03618761, -15.27979322, -9.03400518, -15.28558753, -9.010559777, -15.2858492, -9.006112022, -15.29199656, -8.985981237, -15.29812183, -8.958088079, -15.30417783, -8.933509524, -15.31039446, -8.910064137, -15.3163253, -8.883380515, -15.3163591, -8.88103781, -15.32198973, -8.857975703, -15.32264564, -8.857592423, -15.3286673, -8.835356572, -15.33440116, -8.809951761, -15.33489681, -8.80512071, -15.33986599, -8.785888284, -15.34098847, -8.782884859, -15.34681259, -8.761927818, -15.34712562, -8.748565499, -15.3523469, -8.737864341, -15.35330965, -8.730413145, -15.35760958, -8.71519832, -15.35920384, -8.709456105, -15.35935444, -8.692010289, -15.36482781, -8.689840398, -15.3656091, -8.673857935, -15.37016, -8.667174378, -15.37159509, -8.656984391, -15.37521796, -8.645955877, -15.37728919, -8.637368685, -15.37998247, -8.621406362, -15.38271042, -8.619150435, -15.38396525, -8.600429181, -15.38446901, -8.598387632, -15.3878379, -8.597931934, -15.38975058, -8.584896971, -15.39268856, -8.578205288, -15.39524198, -8.566678722, -15.39724391, -8.555186559, -15.40045785, -8.549907991, -15.40151877, -8.533732452, -15.40537804, -8.530181346, -15.40777355, -8.514207008, -15.41001882, -8.511985486, -15.41305962, -8.497436278, -15.41436244, -8.490531378, -15.41806751, -8.482157403, -15.41842307, -8.470670937, -15.4227778, -8.463961543, -15.42720612, -8.447330305, -15.4307395, -8.42968569, -15.43133545, -8.427469864, -15.43553679, -8.4159376, -15.44003458, -8.399306362, -15.44424784, -8.38426879, -15.44816032, -8.366026555, -15.44827899, -8.363465887, -15.45286304, -8.35128242, -15.45714572, -8.336244847, -15.46114133, -8.322825482, -15.46483439, -8.306221769, -15.46567544, -8.298810706, -15.46823707, -8.291272936, -15.47004361, -8.288220905, -15.47410857, -8.274801539, -15.47788392, -8.263020695, -15.481355, -8.248071863, -15.48292615, -8.235749191, -15.48453327, -8.234790568, -15.48707581, -8.226777596, -15.48740652, -8.217977924, -15.49092042, -8.214996753, -15.49447293, -8.20487079, -15.49771946, -8.191589495, -15.50067077, -8.179984937, -15.50395693, -8.16697281, -15.50757859, -8.156846847, -15.51090566, -8.148388421, -15.51392507, -8.136783864, -15.51664689, -8.12686202, -15.51697956, -8.114501096, -15.51906056, -8.113417776, -15.52068425, -8.108822904, -15.52117398, -8.101659405, -15.52408034, -8.100364479, -15.52717937, -8.09358279, -15.52996911, -8.083660946, -15.5324589, -8.075424789, -15.53463903, -8.063666418, -15.53651668, -8.053591511, -15.53725502, -8.052340536, -15.54042292, -8.045558848, -15.54329133, -8.040459873, -15.54584884, -8.032223716, -15.54810408, -8.025673431, -15.55004818, -8.015598524, -15.5516876, -8.007202277, -15.55366648, -7.997534905, -15.55660359, -7.99243593, -15.55923879, -7.989022643, -15.56156152, -7.982472357, -15.56357969, -7.977605538, -15.56528528, -7.96920929, -15.56668404, -7.962484676, -15.56777045, -7.95182003, -15.56991584, -7.944411987, -15.57261954, -7.9409987, -15.57501896, -7.939271284, -15.57710437, -7.934404464, -15.57888297, -7.931216303, -15.58034759, -7.924491689, -15.58150325, -7.919429632, -15.58234532, -7.910416575, -15.58287666, -7.903042402, -15.5860003, -7.892974757, -15.58846801, -7.891247341, -15.59062906, -7.891203391, -15.59247463, -7.88801523, -15.59401115, -7.886498702, -15.59523236, -7.881436645, -15.59614251, -7.878026177, -15.59673787, -7.870652004, -15.59702055, -7.864902411, -15.60606629, -7.844814157, -15.60896147, -7.843443658, -15.60993682, -7.84003319, -15.61059907, -7.838261605, -15.61094537, -7.832512012, -15.6109771, -7.828371232, -15.61097733, -7.822365827, -15.61097798, -7.804342414, -15.62373114, -7.802040203, -15.62445822, -7.800268618, -15.62487019, -7.800121613, -15.6249651, -7.795980833, -15.63895311, -7.763590435, -15.89067205, -7.750942164, -15.90657862, -7.745055755, -15.9224852, -7.739169347, -15.92251704, -7.731917545, -15.93842362, -7.726031136, -15.95436203, -7.712892925, -15.95439394, -7.706061562, -15.97033236, -7.692923351, -15.97039624, -7.679676568, -15.98630269, -7.672953778, -15.98633466, -7.666538358, -15.98643058, -7.64728617, -14.44665867, -11.62641325, -14.46705912, -11.62052684, -14.47731848, -11.61464043, -14.48757784, -11.60875402, -14.49771689, -11.60150222, -14.50803567, -11.59561581, -14.51832428, -11.5824776, -14.52843108, -11.57564624, -14.5286129, -11.56933939, -14.53877967, -11.56250802, -14.54912827, -11.54936981, -14.55917137, -11.53612303, -14.55944623, -11.52940024, -14.56958023, -11.52298482, -14.56976419, -11.50943067, -14.57949778, -11.50373263, -14.57995874, -11.50301525, -14.58996717, -11.49059442, -14.59033726, -11.48304567, -14.60040653, -11.47062485, -14.60068465, -11.45666068, -14.6102875, -11.45260143, -14.61084589, -11.45065527, -14.62078799, -11.43263186, -14.62125443, -11.42427028, -14.63128847, -11.41266229, -14.63166296, -11.39788529, -14.64110147, -11.38943079, -14.64175844, -11.38627729, -14.65166335, -11.36946121, -14.65222841, -11.3598923, -14.66219504, -11.34307622, -14.66266706, -11.3275019, -14.67196887, -11.32143727, -14.67272672, -11.31669123, -14.67310571, -11.2951115, -14.68256256, -11.29505228, -14.68322741, -11.28430083, -14.69220336, -11.26896556, -14.69315624, -11.26866728, -14.6937281, -11.25191043, -14.70285931, -11.24258056, -14.70371925, -11.23627689, -14.71351527, -11.21619557, -14.71428227, -11.20388649, -14.72308359, -11.18602535, -14.72414089, -11.18380517, -14.72481378, -11.1658935, -14.73380209, -11.15964036, -14.73476651, -11.15141477, -14.7353453, -11.12790051, -14.7444906, -11.12724996, -14.74536097, -11.11342179, -14.75401495, -11.09935451, -14.75517911, -11.09485956, -14.75595543, -11.0754288, -14.76476662, -11.06696412, -14.7658368, -11.05686658, -14.7741521, -11.03567901, -14.7755183, -11.03457372, -14.77649449, -11.01887359, -14.7849672, -11.00328861, -14.78623951, -10.99658073, -14.78712052, -10.97567252, -14.79578231, -10.97089821, -14.79696071, -10.95858774, -14.80509053, -10.93655215, -14.80656731, -10.93290522, -14.80765061, -10.91538667, -14.81596933, -10.90416176, -14.81735231, -10.89491224, -14.8183405, -10.8721856, -14.82513479, -10.86707091, -14.82681841, -10.86616877, -14.82810636, -10.85171116, -14.83607755, -10.83468052, -14.83766748, -10.82817578, -14.83886041, -10.80851009, -14.84699096, -10.79668753, -14.84848597, -10.78497471, -14.8561051, -10.76275792, -14.85790437, -10.75869454, -14.85930446, -10.74177363, -14.86708311, -10.72476493, -14.86878758, -10.71549347, -14.8700915, -10.69374969, -14.87605011, -10.68868453, -14.87806112, -10.68677194, -14.87967078, -10.67229239, -14.88709297, -10.65069154, -14.88900932, -10.64357087, -14.89052292, -10.62426845, -14.89591067, -10.61273802, -14.89813584, -10.61269856, -14.89995752, -10.6003698, -14.90137505, -10.57624451, -14.90701864, -10.57474503, -14.90914929, -10.56949748, -14.91087503, -10.55234585, -14.91812661, -10.53675205, -14.92016275, -10.52629641, -14.92179254, -10.50432191, -14.92685818, -10.49719018, -14.92920558, -10.49355097, -14.93114592, -10.47827247, -14.93803149, -10.4591972, -14.94028455, -10.4503499, -14.94212909, -10.43024852, -14.94660962, -10.41827896, -14.94917623, -10.41599612, -14.95133365, -10.40232596, -14.95784851, -10.38028597, -14.96032097, -10.37279505, -14.96238275, -10.35430201, -14.96627097, -10.33825065, -14.96905927, -10.3370849, -14.97143626, -10.32477111, -14.97340107, -10.3018303, -14.97757568, -10.30025766, -14.98027003, -10.29388383, -14.98255155, -10.27674716, -14.98584023, -10.25733202, -14.98885269, -10.25705659, -14.99145176, -10.24585988, -14.99363648, -10.22427545, -14.99721097, -10.21933903, }; break;
     12        case "Kursawe": data = new double[] { -20, 8.180035271e-11, -19.01225297, -0.1080697151, -19.03029552, -0.07779104234, -19.04837418, -0.04902448937, -19.06648904, -0.02174786463, -19.06648904, -0.02174786463, -18.00915364, -3.810091895, -18.00915364, -3.810091895, -18.02518798, -3.777701496, -18.02518798, -3.777701496, -18.04125442, -3.739708509, -18.05735302, -3.696507436, -18.05735302, -3.696507436, -18.07348385, -3.648483493, -18.07348385, -3.648483493, -18.08964698, -3.59601178, -18.10584246, -3.53945657, -18.12207037, -3.479170725, -18.13833076, -3.415495219, -18.15462371, -3.348758763, -18.15462371, -3.348758763, -18.17094928, -3.279277522, -18.17094928, -3.279277522, -18.18730753, -3.207354924, -18.20369853, -3.133281537, -18.22012235, -3.057335028, -18.23657904, -2.979780177, -18.25306868, -2.900868953, -18.25306868, -2.900868953, -18.26959134, -2.820840641, -18.26959134, -2.820840641, -18.28614707, -2.739922013, -18.30273595, -2.658327536, -18.31935804, -2.576259622, -18.3360134, -2.4939089, -18.35270211, -2.411454518, -18.36942423, -2.329064462, -18.38617983, -2.246895899, -18.38617983, -2.246895899, -18.40296898, -2.165095526, -18.40296898, -2.165095526, -18.41979173, -2.083799937, -18.43664817, -2.00313599, -18.45353835, -1.923221187, -18.47046234, -1.84416405, -18.48742022, -1.766064503, -18.50441205, -1.68901425, -18.52143789, -1.61309715, -18.53849782, -1.538389585, -18.5555919, -1.464960831, -18.57272021, -1.392873411, -18.58988281, -1.322183448, -18.60707976, -1.252941004, -18.62431115, -1.185190416, -18.64157703, -1.118970613, -18.65887748, -1.054315433, -18.67621256, -0.9912539178, -18.69358235, -0.9298106093, -18.71098692, -0.870005823, -18.71098692, -0.870005823, -18.72842632, -0.8118559173, -18.74590065, -0.7553735491, -18.74590065, -0.7553735491, -18.76340995, -0.7005679181, -18.78095431, -0.6474450005, -18.79853379, -0.5960077704, -18.79853379, -0.5960077704, -18.81614847, -0.5462564117, -18.83379841, -0.4981885184, -18.85148369, -0.4517992843, -18.86920437, -0.4070816833, -18.88696053, -0.3640266386, -18.90475223, -0.3226231835, -18.92257956, -0.2828586119, -18.94044258, -0.2447186203, -18.94044258, -0.2447186203, -18.95834135, -0.2081874415, -18.97627596, -0.1732479687, -18.97627596, -0.1732479687, -18.99424648, -0.1398818735, -17.00146394, -3.950949465, -17.00340012, -3.949973769, -17.00540432, -3.944546604, -17.00747653, -3.934237505, -17.00961678, -3.918609163, -17.02140662, -3.91816161, -17.02344686, -3.914267931, -17.0255552, -3.905470952, -17.02773164, -3.891332538, -17.03944916, -3.887882937, -17.04152552, -3.885501378, -17.04367005, -3.878194327, -17.94533603, -3.875471082, -17.9612426, -3.869584673, -17.97718102, -3.856446463, -17.99315134, -3.836476889, -16.00230499, -7.646568784, -16.002369, -7.634147959, -16.01830729, -7.62018379, -16.01833932, -7.614178385, -16.01843543, -7.596154972, -16.03434162, -7.587793392, -16.03440576, -7.576185398, -16.05037596, -7.555402993, -16.05040806, -7.549800405, -16.05050436, -7.532984325, -16.0664424, -7.517410006, -16.06650666, -7.506599331, -16.06663519, -7.484960382, -16.08250883, -7.479417019, -16.082541, -7.474208933, -16.08263749, -7.458575388, -16.09860744, -7.436215946, -16.09867183, -7.42618499, -16.09880062, -7.406103675, -16.11470604, -7.393014872, -16.11473827, -7.388192003, -16.11483496, -7.373713276, -16.1149961, -7.349548465, -16.13083687, -7.34499093, -16.13090139, -7.335720289, -16.13103044, -7.317158066, -16.1469677, -7.296966987, -16.14699999, -7.292519216, -16.14709688, -7.279165079, -16.14725835, -7.256872221, -16.16313083, -7.244495273, -16.16319548, -7.235964006, -16.16332478, -7.218879234, -16.16351874, -7.193196715, -16.17929395, -7.19202356, -16.17932631, -7.187940063, -16.17942339, -7.175678161, -16.17958518, -7.155203728, -16.19548944, -7.13546835, -16.19555422, -7.127654218, -16.19568378, -7.112002655, -16.19587813, -7.088467272, -16.21168492, -7.078913139, -16.21171734, -7.075182505, -16.21181461, -7.063978712, -16.21197673, -7.045266199, -16.2122037, -7.018986032, -16.22791283, -7.018627294, -16.22797774, -7.011506999, -16.22810756, -6.997242256, -16.2283023, -6.975784958, -16.24414073, -6.958341449, -16.24417322, -6.954951788, -16.24427069, -6.944770543, -16.24443313, -6.927761016, -16.24466055, -6.90386236, -16.26040113, -6.894665943, -16.26046617, -6.888215332, -16.26059626, -6.875289302, -16.26079138, -6.855838417, -16.27666153, -6.830990438, -16.27669408, -6.827929487, -16.27679174, -6.818734092, -16.27695451, -6.803366704, -16.27718238, -6.781765031, -16.29295447, -6.764253981, -16.29301965, -6.758448247, -16.29314999, -6.746811494, -16.29334551, -6.729293317, -16.2936062, -6.705818522, -16.30924742, -6.697517525, -16.30928004, -6.694772741, -16.3093779, -6.686525649, -16.30954099, -6.672738107, -16.30976932, -6.653346808, -16.31006289, -6.62826367, -16.32557299, -6.628036285, -16.32563829, -6.622850143, -16.3257689, -6.612452262, -16.32596481, -6.596791598, -16.32622602, -6.575791957, -16.34189856, -6.558555045, -16.34193124, -6.556113687, -16.34202929, -6.548776756, -16.34219271, -6.536505753, -16.3424215, -6.519236746, -16.34271566, -6.496880733, -16.35825681, -6.486632446, -16.35832224, -6.4820403, -16.35845311, -6.472830247, -16.35864941, -6.458950901, -16.35891114, -6.440325523, -16.35923832, -6.416852421, -16.37461506, -6.414709848, -16.37464781, -6.41255906, -16.37474606, -6.406093791, -16.37490981, -6.395275396, -16.37513905, -6.380039678, -16.3754338, -6.360297211, -16.39100606, -6.340636461, -16.39107163, -6.33661255, -16.39120275, -6.328538939, -16.39139945, -6.316364172, -16.39166171, -6.300011366, -16.39198953, -6.279378582, -16.40739706, -6.266563075, -16.40742988, -6.264689952, -16.40752832, -6.259057699, -16.4076924, -6.249627716, -16.4079221, -6.23633586, -16.40821744, -6.219092737, -16.40857841, -6.197784106, -16.42382088, -6.190616565, -16.42388657, -6.187135101, -16.42401796, -6.180146475, -16.42421505, -6.169599404, -16.42447784, -6.155417232, -16.42480632, -6.137498261, -16.4252005, -6.115716192, -16.44024469, -6.114670056, -16.44027757, -6.113061714, -16.44037622, -6.108223877, -16.44054062, -6.100118163, -16.44077078, -6.088680775, -16.44106671, -6.073822755, -16.44142841, -6.055430347, -16.45670139, -6.037115205, -16.45676722, -6.03415049, -16.45689887, -6.028195565, -16.45709635, -6.019199535, -16.45735966, -6.007086299, -16.4576888, -5.991754841, -16.45808377, -5.973079625, -16.47315809, -5.959560354, -16.47319103, -5.958203981, -16.47328987, -5.954122178, -16.4734546, -5.947276937, -16.47368523, -5.937605058, -16.47398175, -5.925018385, -16.47434417, -5.909404119, -16.47477248, -5.890625242, -16.48964773, -5.88064913, -16.48971369, -5.878175669, -16.4898456, -5.87320355, -16.49004348, -5.86568246, -16.49030732, -5.855537144, -16.49063712, -5.842667663, -16.49103288, -5.826949736, -16.4914946, -5.808235186, -16.50613737, -5.801737906, -16.50617038, -5.800620818, -16.50626942, -5.797257041, -16.50643448, -5.791609073, -16.50666557, -5.783614546, -16.50696268, -5.773186422, -16.50732583, -5.76021328, -16.507755, -5.744559681, -16.5082502, -5.726066623, -16.52266002, -5.721709594, -16.52272612, -5.719702189, -16.5228583, -5.715662564, -16.52305657, -5.709541159, -16.52332093, -5.701263824, -16.52365139, -5.69073204, -16.52404795, -5.677823224, -16.5245106, -5.662391118, -16.52503934, -5.644266251, -16.53918268, -5.641681282, -16.53921576, -5.640790966, -16.53931499, -5.638107713, -16.53948039, -5.63359465, -16.53971194, -5.627190437, -16.54000964, -5.618809442, -16.54037351, -5.608341984, -16.54080355, -5.595654661, -16.54129974, -5.580590745, -16.5418621, -5.562970662, -16.55573841, -5.560762654, -16.55580463, -5.559196489, -16.55593708, -5.556039799, -16.55613575, -5.551243928, -16.55640065, -5.544736055, -16.55673177, -5.536419386, -16.55712911, -5.526173421, -16.55759269, -5.513854289, -16.55812249, -5.499295156, -16.55871853, -5.482306715, -16.57229414, -5.479844025, -16.57232729, -5.479168177, -16.57242672, -5.477128575, -16.57259245, -5.473689077, -16.57282446, -5.468789546, -16.57312277, -5.462345999, -16.57348736, -5.454250823, -16.57391826, -5.444373049, -16.57441544, -5.4325587, -16.57497893, -5.418631209, -16.57560871, -5.402391911, -16.58888302, -5.398249549, -16.58894938, -5.397100263, -16.58908209, -5.394777853, -16.58928116, -5.391234694, -16.58954658, -5.38639949, -16.58987836, -5.380177436, -16.59027651, -5.37245045, -16.59074101, -5.363077459, -16.59127188, -5.351894753, -16.59186911, -5.338716406, -16.59253271, -5.323334774, -16.6054719, -5.316655072, -16.60550511, -5.316181635, -16.60560474, -5.314749541, -16.6057708, -5.312323471, -16.60600328, -5.308844639, -16.60630218, -5.304230927, -16.60666751, -5.298377064, -16.60709926, -5.291154861, -16.60759745, -5.282413512, -16.60816206, -5.271979949, -16.6087931, -5.259659269, -16.60949059, -5.245235228, -16.62209399, -5.234587158, -16.62216048, -5.233830913, -16.62229345, -5.232295159, -16.62249292, -5.229933415, -16.62275888, -5.226676076, -16.62309132, -5.222430554, -16.62349026, -5.217081474, -16.6239557, -5.210490914, -16.62448763, -5.202498709, -16.62508605, -5.192922812, -16.62575098, -5.181559722, -16.62648241, -5.168184975, -16.62728035, -5.152553719, -16.63871608, -5.152519244, -16.63874935, -5.152236436, -16.63884919, -5.15137653, -16.63901557, -5.149905103, -16.63924852, -5.147764852, -16.63954802, -5.144875703, -16.63991408, -5.141134965, -16.6403467, -5.136417527, -16.64084588, -5.130576111, -16.64141162, -5.123441572, -16.64204393, -5.114823266, -16.64274281, -5.104509469, -16.64350826, -5.092267874, -16.64434028, -5.077846155, -16.65537144, -5.070168522, -16.65543806, -5.069782054, -16.65557131, -5.068986474, -16.65577117, -5.06773654, -16.65603766, -5.065964479, -16.65637077, -5.063580114, -16.65677051, -5.060471018, -16.65723688, -5.056502724, -16.65776987, -5.051518974, -16.6583695, -5.045342025, -16.65903576, -5.037773013, -16.65976865, -5.028592369, -16.66056819, -5.01756031, -16.66143436, -5.004417401, -16.66236719, -4.988885191, -16.67202681, -4.9878178, -16.67206015, -4.98771414, -16.67216018, -4.987391998, -16.67232691, -4.986817911, -16.67256032, -4.985936167, -16.67286042, -4.98466889, -16.67322721, -4.982916167, -16.67366069, -4.980556215, -16.67416087, -4.977445587, -16.67472775, -4.973419427, -16.67536132, -4.968291773, -16.6760616, -4.961855912, -16.67682858, -4.953884804, -16.67766227, -4.944131556, -16.67856267, -4.932329981, -16.67952978, -4.918195228, -16.68871552, -4.905363418, -16.68878227, -4.905324084, -16.68891578, -4.905223435, -16.68911605, -4.905017539, -16.68938307, -4.904640578, -16.68971685, -4.904004943, -16.69011739, -4.903001364, -16.69058469, -4.901499078, -16.69111875, -4.89934604, -16.69171958, -4.896369174, -16.69238717, -4.892374672, -16.69312153, -4.887148348, -16.69392267, -4.88045605, -16.69479058, -4.872044136, -16.69572527, -4.861640018, -16.69672674, -4.848952784, -16.697795, -4.83367391, -16.70660703, -4.82409014, -16.70704138, -4.823944227, -16.70754257, -4.823399531, -16.70811058, -4.822295788, -16.70874542, -4.820452074, -16.7094471, -4.817667107, -16.71021562, -4.813719594, -16.71105097, -4.80836863, -16.71195317, -4.801354173, -16.71292222, -4.792397574, -16.71395813, -4.781202196, -16.71506088, -4.767454107, -16.7162305, -4.750822869, -16.72513642, -4.746378687, -16.72580535, -4.745744509, -16.72654118, -4.744238354, -16.72734392, -4.741632174, -16.72821357, -4.737678667, -16.72915013, -4.732111729, -16.73015361, -4.724646986, -16.73122401, -4.714982393, -16.73236133, -4.702798926, -16.73236133, -4.702798926, -16.73356558, -4.687761354, -16.74289943, -4.672315755, -16.74366949, -4.672150934, -16.74450652, -4.670942211, -16.74541053, -4.668436223, -16.74638152, -4.664361141, -16.74741949, -4.658427183, -16.74852446, -4.650327213, -16.74969642, -4.639737411, -16.75093537, -4.626318045, -16.75224133, -4.609714333, -16.76170348, -4.601699767, -16.76264191, -4.600685635, -16.7636474, -4.598141338, -16.76471994, -4.593772002, -16.76585954, -4.587265698, -16.7670662, -4.578294103, -16.76833994, -4.566513259, -16.76968074, -4.551564427, -16.77990779, -4.534465832, -16.78094785, -4.533486157, -16.78205502, -4.530710488, -16.78322933, -4.525822389, -16.78447077, -4.518489316, -16.78577934, -4.508363353, -16.78715506, -4.495082059, -16.78859793, -4.478269415, -16.79828293, -4.470424643, -16.79828293, -4.470424643, -16.79942481, -4.469267179, -16.80063389, -4.466017603, -16.80191018, -4.460339411, -16.80325366, -4.451880985, -16.80466437, -4.440276428, -16.80614229, -4.425146497, -16.80614229, -4.425146497, -16.81682938, -4.409462393, -16.8180733, -4.407867697, -16.8193845, -4.403857043, -16.82076297, -4.397075354, -16.82220873, -4.38715351, -16.82372177, -4.373709267, -16.82530211, -4.356348307, -16.83554762, -4.351385329, -16.8368938, -4.349051412, -16.83830733, -4.343952437, -16.83978821, -4.33571628, -16.84133645, -4.323957908, -16.84295205, -4.308280414, -16.85305693, -4.296579698, -16.85443816, -4.295928494, -16.85443816, -4.295928494, -16.85588681, -4.292515207, -16.85740288, -4.285964921, -16.85898639, -4.275890015, -16.86063733, -4.261891179, -16.87201764, -4.244491264, -16.87350149, -4.242763848, -16.87505283, -4.237897028, -16.87667166, -4.229500781, -16.87835801, -4.217173578, -16.88011187, -4.200503527, -16.88963232, -4.194739905, -16.89115143, -4.194695955, -16.8927381, -4.191507794, -16.89439235, -4.18478318, -16.89611417, -4.174118534, -16.89790358, -4.159100072, -16.9088367, -4.14830672, -16.91045878, -4.146790193, -16.91214851, -4.141728135, -16.91390588, -4.132715079, -16.9157309, -4.119335501, -16.92821494, -4.103735148, -16.92994021, -4.10032468, -16.9317332, -4.092950507, -16.93359392, -4.081195509, -16.93552237, -4.064633904, -16.94600665, -4.062331693, -16.94776754, -4.060560108, -16.94959622, -4.054810515, -16.9514927, -4.04466433, -16.95345698, -4.029694431, -16.96383398, -4.022567121, -16.96563055, -4.022420117, -16.967495, -4.018279337, -16.96942731, -4.009724858, -16.9714275, -3.996328336, -16.98352933, -3.985888938, -16.98542961, -3.983339864, -16.98739782, -3.976358762, -16.98943399, -3.964516178, -15.0001297, -10.21385551, -15.00263349, -10.19783594, -15.00855446, -10.17613796, -15.01137813, -10.16583157, -15.01378531, -10.14536423, -15.01675233, -10.13774455, -15.01989795, -10.13293688, -15.02262656, -10.11780763, -15.02816253, -10.09454348, -15.03121332, -10.08491294, -15.03384551, -10.06533591, -15.03619769, -10.05567664, -15.03957273, -10.05134241, -15.04252869, -10.036889, -15.04506446, -10.0128642, -15.04767481, -10.01247557, -15.05095527, -10.00331847, -15.05381503, -9.984417286, -15.05554495, -9.973325919, -15.05915193, -9.969274494, -15.06233781, -9.955294523, -15.06510137, -9.931945573, -15.06708919, -9.930124846, -15.07060187, -9.921250552, -15.07369178, -9.902822809, -15.07479198, -9.890871537, -15.07863344, -9.886923772, -15.0820518, -9.873226609, -15.08504576, -9.850351096, -15.08640354, -9.847670463, -15.09015099, -9.83889983, -15.09347365, -9.820754895, -15.09393662, -9.808481481, -15.09801511, -9.80446939, -15.10166854, -9.790875887, -15.1048955, -9.768283182, -15.10561569, -9.765280407, -15.10960048, -9.756445447, -15.11315849, -9.738404174, -15.11729476, -9.722079334, -15.12118584, -9.708421504, -15.12464843, -9.68593246, -15.12472345, -9.683111844, -15.12894815, -9.674055391, -15.13274411, -9.655949791, -15.13647021, -9.639910771, -15.14060154, -9.626031449, -15.14430238, -9.603478078, -15.1481918, -9.591886828, -15.15222833, -9.573559735, -15.15553921, -9.558110399, -15.15583263, -9.546922867, -15.15991339, -9.543862886, -15.16385513, -9.521088022, -15.16732918, -9.510086456, -15.17160891, -9.491391172, -15.17449952, -9.476814809, -15.17545441, -9.464532811, -15.17911916, -9.462062513, -15.18139811, -9.439351936, -15.18330444, -9.438919459, -15.18635804, -9.428790867, -15.1908836, -9.4095908, -15.19334885, -9.396150862, -15.19497297, -9.382364248, -15.19821656, -9.380766924, -15.20006589, -9.359437132, -15.20264804, -9.357119086, -15.20527608, -9.34812692, -15.2100501, -9.328295211, -15.21208491, -9.316236059, -15.21438602, -9.300563876, -15.2172033, -9.300102977, -15.21861792, -9.280379995, -15.22188363, -9.275823497, -15.22408097, -9.268212116, -15.2291061, -9.247631264, -15.23070534, -9.237178922, -15.23607704, -9.220188174, -15.23705188, -9.202280449, -15.24100889, -9.19515955, -15.24277038, -9.189154979, -15.24314087, -9.16843127, -15.24804925, -9.16771646, -15.24920779, -9.159079375, -15.25483543, -9.141131037, -15.25536538, -9.125230196, -15.26002147, -9.115244747, -15.26134193, -9.111055433, -15.2668772, -9.088659323, -15.26758989, -9.082029123, -15.27347607, -9.06303149, -15.27355602, -9.049313095, -15.27891897, -9.03618761, -15.27979322, -9.03400518, -15.28558753, -9.010559777, -15.2858492, -9.006112022, -15.29199656, -8.985981237, -15.29812183, -8.958088079, -15.30417783, -8.933509524, -15.31039446, -8.910064137, -15.3163253, -8.883380515, -15.3163591, -8.88103781, -15.32198973, -8.857975703, -15.32264564, -8.857592423, -15.3286673, -8.835356572, -15.33440116, -8.809951761, -15.33489681, -8.80512071, -15.33986599, -8.785888284, -15.34098847, -8.782884859, -15.34681259, -8.761927818, -15.34712562, -8.748565499, -15.3523469, -8.737864341, -15.35330965, -8.730413145, -15.35760958, -8.71519832, -15.35920384, -8.709456105, -15.35935444, -8.692010289, -15.36482781, -8.689840398, -15.3656091, -8.673857935, -15.37016, -8.667174378, -15.37159509, -8.656984391, -15.37521796, -8.645955877, -15.37728919, -8.637368685, -15.37998247, -8.621406362, -15.38271042, -8.619150435, -15.38396525, -8.600429181, -15.38446901, -8.598387632, -15.3878379, -8.597931934, -15.38975058, -8.584896971, -15.39268856, -8.578205288, -15.39524198, -8.566678722, -15.39724391, -8.555186559, -15.40045785, -8.549907991, -15.40151877, -8.533732452, -15.40537804, -8.530181346, -15.40777355, -8.514207008, -15.41001882, -8.511985486, -15.41305962, -8.497436278, -15.41436244, -8.490531378, -15.41806751, -8.482157403, -15.41842307, -8.470670937, -15.4227778, -8.463961543, -15.42720612, -8.447330305, -15.4307395, -8.42968569, -15.43133545, -8.427469864, -15.43553679, -8.4159376, -15.44003458, -8.399306362, -15.44424784, -8.38426879, -15.44816032, -8.366026555, -15.44827899, -8.363465887, -15.45286304, -8.35128242, -15.45714572, -8.336244847, -15.46114133, -8.322825482, -15.46483439, -8.306221769, -15.46567544, -8.298810706, -15.46823707, -8.291272936, -15.47004361, -8.288220905, -15.47410857, -8.274801539, -15.47788392, -8.263020695, -15.481355, -8.248071863, -15.48292615, -8.235749191, -15.48453327, -8.234790568, -15.48707581, -8.226777596, -15.48740652, -8.217977924, -15.49092042, -8.214996753, -15.49447293, -8.20487079, -15.49771946, -8.191589495, -15.50067077, -8.179984937, -15.50395693, -8.16697281, -15.50757859, -8.156846847, -15.51090566, -8.148388421, -15.51392507, -8.136783864, -15.51664689, -8.12686202, -15.51697956, -8.114501096, -15.51906056, -8.113417776, -15.52068425, -8.108822904, -15.52117398, -8.101659405, -15.52408034, -8.100364479, -15.52717937, -8.09358279, -15.52996911, -8.083660946, -15.5324589, -8.075424789, -15.53463903, -8.063666418, -15.53651668, -8.053591511, -15.53725502, -8.052340536, -15.54042292, -8.045558848, -15.54329133, -8.040459873, -15.54584884, -8.032223716, -15.54810408, -8.025673431, -15.55004818, -8.015598524, -15.5516876, -8.007202277, -15.55366648, -7.997534905, -15.55660359, -7.99243593, -15.55923879, -7.989022643, -15.56156152, -7.982472357, -15.56357969, -7.977605538, -15.56528528, -7.96920929, -15.56668404, -7.962484676, -15.56777045, -7.95182003, -15.56991584, -7.944411987, -15.57261954, -7.9409987, -15.57501896, -7.939271284, -15.57710437, -7.934404464, -15.57888297, -7.931216303, -15.58034759, -7.924491689, -15.58150325, -7.919429632, -15.58234532, -7.910416575, -15.58287666, -7.903042402, -15.5860003, -7.892974757, -15.58846801, -7.891247341, -15.59062906, -7.891203391, -15.59247463, -7.88801523, -15.59401115, -7.886498702, -15.59523236, -7.881436645, -15.59614251, -7.878026177, -15.59673787, -7.870652004, -15.59702055, -7.864902411, -15.60606629, -7.844814157, -15.60896147, -7.843443658, -15.60993682, -7.84003319, -15.61059907, -7.838261605, -15.61094537, -7.832512012, -15.6109771, -7.828371232, -15.61097733, -7.822365827, -15.61097798, -7.804342414, -15.62373114, -7.802040203, -15.62445822, -7.800268618, -15.62487019, -7.800121613, -15.6249651, -7.795980833, -15.63895311, -7.763590435, -15.89067205, -7.750942164, -15.90657862, -7.745055755, -15.9224852, -7.739169347, -15.92251704, -7.731917545, -15.93842362, -7.726031136, -15.95436203, -7.712892925, -15.95439394, -7.706061562, -15.97033236, -7.692923351, -15.97039624, -7.679676568, -15.98630269, -7.672953778, -15.98633466, -7.666538358, -15.98643058, -7.64728617, -14.44665867, -11.62641325, -14.46705912, -11.62052684, -14.47731848, -11.61464043, -14.48757784, -11.60875402, -14.49771689, -11.60150222, -14.50803567, -11.59561581, -14.51832428, -11.5824776, -14.52843108, -11.57564624, -14.5286129, -11.56933939, -14.53877967, -11.56250802, -14.54912827, -11.54936981, -14.55917137, -11.53612303, -14.55944623, -11.52940024, -14.56958023, -11.52298482, -14.56976419, -11.50943067, -14.57949778, -11.50373263, -14.57995874, -11.50301525, -14.58996717, -11.49059442, -14.59033726, -11.48304567, -14.60040653, -11.47062485, -14.60068465, -11.45666068, -14.6102875, -11.45260143, -14.61084589, -11.45065527, -14.62078799, -11.43263186, -14.62125443, -11.42427028, -14.63128847, -11.41266229, -14.63166296, -11.39788529, -14.64110147, -11.38943079, -14.64175844, -11.38627729, -14.65166335, -11.36946121, -14.65222841, -11.3598923, -14.66219504, -11.34307622, -14.66266706, -11.3275019, -14.67196887, -11.32143727, -14.67272672, -11.31669123, -14.67310571, -11.2951115, -14.68256256, -11.29505228, -14.68322741, -11.28430083, -14.69220336, -11.26896556, -14.69315624, -11.26866728, -14.6937281, -11.25191043, -14.70285931, -11.24258056, -14.70371925, -11.23627689, -14.71351527, -11.21619557, -14.71428227, -11.20388649, -14.72308359, -11.18602535, -14.72414089, -11.18380517, -14.72481378, -11.1658935, -14.73380209, -11.15964036, -14.73476651, -11.15141477, -14.7353453, -11.12790051, -14.7444906, -11.12724996, -14.74536097, -11.11342179, -14.75401495, -11.09935451, -14.75517911, -11.09485956, -14.75595543, -11.0754288, -14.76476662, -11.06696412, -14.7658368, -11.05686658, -14.7741521, -11.03567901, -14.7755183, -11.03457372, -14.77649449, -11.01887359, -14.7849672, -11.00328861, -14.78623951, -10.99658073, -14.78712052, -10.97567252, -14.79578231, -10.97089821, -14.79696071, -10.95858774, -14.80509053, -10.93655215, -14.80656731, -10.93290522, -14.80765061, -10.91538667, -14.81596933, -10.90416176, -14.81735231, -10.89491224, -14.8183405, -10.8721856, -14.82513479, -10.86707091, -14.82681841, -10.86616877, -14.82810636, -10.85171116, -14.83607755, -10.83468052, -14.83766748, -10.82817578, -14.83886041, -10.80851009, -14.84699096, -10.79668753, -14.84848597, -10.78497471, -14.8561051, -10.76275792, -14.85790437, -10.75869454, -14.85930446, -10.74177363, -14.86708311, -10.72476493, -14.86878758, -10.71549347, -14.8700915, -10.69374969, -14.87605011, -10.68868453, -14.87806112, -10.68677194, -14.87967078, -10.67229239, -14.88709297, -10.65069154, -14.88900932, -10.64357087, -14.89052292, -10.62426845, -14.89591067, -10.61273802, -14.89813584, -10.61269856, -14.89995752, -10.6003698, -14.90137505, -10.57624451, -14.90701864, -10.57474503, -14.90914929, -10.56949748, -14.91087503, -10.55234585, -14.91812661, -10.53675205, -14.92016275, -10.52629641, -14.92179254, -10.50432191, -14.92685818, -10.49719018, -14.92920558, -10.49355097, -14.93114592, -10.47827247, -14.93803149, -10.4591972, -14.94028455, -10.4503499, -14.94212909, -10.43024852, -14.94660962, -10.41827896, -14.94917623, -10.41599612, -14.95133365, -10.40232596, -14.95784851, -10.38028597, -14.96032097, -10.37279505, -14.96238275, -10.35430201, -14.96627097, -10.33825065, -14.96905927, -10.3370849, -14.97143626, -10.32477111, -14.97340107, -10.3018303, -14.97757568, -10.30025766, -14.98027003, -10.29388383, -14.98255155, -10.27674716, -14.98584023, -10.25733202, -14.98885269, -10.25705659, -14.99145176, -10.24585988, -14.99363648, -10.22427545, -14.99721097, -10.21933903 }; break;
    1813        case "SchafferN1": data = new double[] { 0.0003999999694, 3.920400003, 0.0008999999541, 3.880900003, 0.001599999939, 3.841600003, 0.002499999924, 3.802500003, 0.003599999908, 3.763600003, 0.004899999893, 3.724900003, 0.006399999878, 3.686400003, 0.008099999862, 3.648100003, 0.009999999847, 3.610000003, 0.01209999983, 3.572100003, 0.01439999982, 3.534400003, 0.0168999998, 3.496900003, 0.01959999979, 3.459600003, 0.02249999977, 3.422500003, 0.02559999976, 3.385600003, 0.02889999974, 3.348900003, 0.03239999972, 3.312400003, 0.03609999971, 3.276100003, 0.03999999969, 3.240000003, 0.04409999968, 3.204100003, 0.04839999966, 3.168400003, 0.05289999965, 3.132900003, 0.05759999963, 3.097600003, 0.06249999962, 3.062500003, 0.0675999996, 3.027600003, 0.07289999959, 2.992900003, 0.07839999957, 2.958400003, 0.08409999956, 2.924100003, 0.08999999954, 2.890000003, 0.09609999953, 2.856100003, 0.1023999995, 2.822400003, 0.1088999995, 2.788900003, 0.1155999995, 2.755600003, 0.1224999995, 2.722500003, 0.1295999994, 2.689600003, 0.1368999994, 2.656900002, 0.1443999994, 2.624400002, 0.1520999994, 2.592100002, 0.1599999994, 2.560000002, 0.1680999994, 2.528100002, 0.1763999994, 2.496400002, 0.1848999993, 2.464900002, 0.1935999993, 2.433600002, 0.2024999993, 2.402500002, 0.2115999993, 2.371600002, 0.2208999993, 2.340900002, 0.2303999993, 2.310400002, 0.2400999993, 2.280100002, 0.2499999992, 2.250000002, 0.2600999992, 2.220100002, 0.2703999992, 2.190400002, 0.2808999992, 2.160900002, 0.2915999992, 2.131600002, 0.3024999992, 2.102500002, 0.3135999991, 2.073600002, 0.3248999991, 2.044900002, 0.3363999991, 2.016400002, 0.3480999991, 1.988100002, 0.3599999991, 1.960000002, 0.3720999991, 1.932100002, 0.3843999991, 1.904400002, 0.396899999, 1.876900002, 0.409599999, 1.849600002, 0.422499999, 1.822500002, 0.435599999, 1.795600002, 0.448899999, 1.768900002, 0.462399999, 1.742400002, 0.4760999989, 1.716100002, 0.4899999989, 1.690000002, 0.5040999989, 1.664100002, 0.5183999989, 1.638400002, 0.5328999989, 1.612900002, 0.5475999989, 1.587600002, 0.5624999989, 1.562500002, 0.5775999988, 1.537600002, 0.5928999988, 1.512900002, 0.6083999988, 1.488400002, 0.6240999988, 1.464100002, 0.6399999988, 1.440000002, 0.6560999988, 1.416100002, 0.6723999987, 1.392400002, 0.6888999987, 1.368900002, 0.7055999987, 1.345600002, 0.7224999987, 1.322500002, 0.7395999987, 1.299600002, 0.7568999987, 1.276900002, 0.7743999987, 1.254400002, 0.7920999986, 1.232100002, 0.8099999986, 1.210000002, 0.8280999986, 1.188100002, 0.8463999986, 1.166400002, 0.8648999986, 1.144900002, 0.8835999986, 1.123600002, 0.9024999985, 1.102500002, 0.9215999985, 1.081600002, 0.9408999985, 1.060900002, 0.9603999985, 1.040400002, 0.9800999985, 1.020100002, 0.9999999985, 1.000000002, 1.020099998, 0.9801000015, 1.040399998, 0.9604000015, 1.060899998, 0.9409000015, 1.081599998, 0.9216000015, 1.102499998, 0.9025000015, 1.123599998, 0.8836000014, 1.144899998, 0.8649000014, 1.166399998, 0.8464000014, 1.188099998, 0.8281000014, 1.209999998, 0.8100000014, 1.232099998, 0.7921000014, 1.254399998, 0.7744000013, 1.276899998, 0.7569000013, 1.299599998, 0.7396000013, 1.322499998, 0.7225000013, 1.345599998, 0.7056000013, 1.368899998, 0.6889000013, 1.392399998, 0.6724000013, 1.416099998, 0.6561000012, 1.439999998, 0.6400000012, 1.464099998, 0.6241000012, 1.488399998, 0.6084000012, 1.512899998, 0.5929000012, 1.537599998, 0.5776000012, 1.562499998, 0.5625000011, 1.587599998, 0.5476000011, 1.612899998, 0.5329000011, 1.638399998, 0.5184000011, 1.664099998, 0.5041000011, 1.689999998, 0.4900000011, 1.716099998, 0.4761000011, 1.742399998, 0.462400001, 1.768899998, 0.448900001, 1.795599998, 0.435600001, 1.822499998, 0.422500001, 1.849599998, 0.409600001, 1.876899998, 0.396900001, 1.904399998, 0.3844000009, 1.932099998, 0.3721000009, 1.959999998, 0.3600000009, 1.988099998, 0.3481000009, 2.016399998, 0.3364000009, 2.044899998, 0.3249000009, 2.073599998, 0.3136000009, 2.102499998, 0.3025000008, 2.131599998, 0.2916000008, 2.160899998, 0.2809000008, 2.190399998, 0.2704000008, 2.220099998, 0.2601000008, 2.249999998, 0.2500000008, 2.280099998, 0.2401000007, 2.310399998, 0.2304000007, 2.340899998, 0.2209000007, 2.371599998, 0.2116000007, 2.402499998, 0.2025000007, 2.433599998, 0.1936000007, 2.464899998, 0.1849000007, 2.496399998, 0.1764000006, 2.528099998, 0.1681000006, 2.559999998, 0.1600000006, 2.592099998, 0.1521000006, 2.624399998, 0.1444000006, 2.656899998, 0.1369000006, 2.689599997, 0.1296000006, 2.722499997, 0.1225000005, 2.755599997, 0.1156000005, 2.788899997, 0.1089000005, 2.822399997, 0.1024000005, 2.856099997, 0.09610000047, 2.889999997, 0.09000000046, 2.924099997, 0.08410000044, 2.958399997, 0.07840000043, 2.992899997, 0.07290000041, 3.027599997, 0.0676000004, 3.062499997, 0.06250000038, 3.097599997, 0.05760000037, 3.132899997, 0.05290000035, 3.168399997, 0.04840000034, 3.204099997, 0.04410000032, 3.239999997, 0.04000000031, 3.276099997, 0.03610000029, 3.312399997, 0.03240000028, 3.348899997, 0.02890000026, 3.385599997, 0.02560000024, 3.422499997, 0.02250000023, 3.459599997, 0.01960000021, 3.496899997, 0.0169000002, 3.534399997, 0.01440000018, 3.572099997, 0.01210000017, 3.609999997, 0.01000000015, 3.648099997, 0.008100000138, 3.686399997, 0.006400000122, 3.724899997, 0.004900000107, 3.763599997, 0.003600000092, 3.802499997, 0.002500000076, 3.841599997, 0.001600000061, 3.880899997, 0.0009000000459, 3.920399997, 0.0004000000306, 3.960099997, 0.0001000000153, 3.999999997, 5.844575628e-019, 5.844598067e-019, 4.000000003, 9.999998471e-005, 3.960100003, }; break;
    1914
     
    2116      }
    2217      if (data == null) throw new NotImplementedException();
    23       RealVector[] front = new RealVector[data.Length / 2];
     18      double[][] front = new double[data.Length / 2][];
    2419      for(int i = 0; i < data.Length; i += 2) {
    25         front[i / 2] = new RealVector(2);
     20        front[i / 2] = new double[2];
    2621        front[i / 2][0] = data[i];
    2722        front[i / 2][1] = data[i + 1];
  • branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/Fonseca.cs

    r13515 r13620  
    11using System;
     2using System.Collections.Generic;
    23using HeuristicLab.Common;
    34using HeuristicLab.Core;
     
    1112  public class Fonseca : MultiObjectiveTestFunction {
    1213
    13     public override DoubleMatrix Bounds {
    14       get {
    15         return new DoubleMatrix(new double[,] { { -4, 4 } });
    16       }
     14    public override double[,] Bounds(int objectives) {
     15        return new double[,] { { -4, 4 } };
    1716    }
    1817
    19     public override bool[] Maximization {
    20       get {
    21         return new bool[] { false, false };
    22       }
     18    public override bool[] Maximization(int objecitves) {
     19      return new bool[2];
    2320    }
    2421
    25     public override int MaximumProblemSize {
    26       get {
    27         return int.MaxValue;
    28       }
     22    public override int MaximumSolutionLength {
     23      get {return int.MaxValue; }
    2924    }
    3025
    31     public override int MaximumSolutionSize {
    32       get {
    33         return 2;
    34       }
     26    public override int MinimumSolutionLength {
     27      get { return 1; }
    3528    }
    3629
    37     public override int MinimumProblemSize {
    38       get {
    39         return 1;
    40       }
     30    public override int MinimumObjectives {
     31      get { return 2;  }
    4132    }
    4233
    43     public override int MinimumSolutionSize {
    44       get {
    45         return 2;
    46       }
     34    public override int MaximumObjectives {
     35      get { return 2; }
    4736    }
    4837
    49     public override int ActualSolutionSize {
    50       get {
    51         return 2;
    52       }
    5338
    54       set {
    55       }
     39    public override IEnumerable<double[]> OptimalParetoFront(int objectives) {
     40        return PFStore.get(this.ItemName);
     41    }
     42    public override double BestKnownHypervolume(int objectives) {
     43        return new Hypervolume(ReferencePoint(objectives), Maximization(2)).GetHypervolume(OptimalParetoFront(objectives));
    5644    }
    5745
    58     public override RealVector[] OptimalParetoFront {
    59       get {
    60         return PFReader.getFromFile("Fonseca");
    61       }
    62     }
    63     public override double BestKnownHypervolume {
    64       get {
    65         return new Hypervolume(base.ReferencePoint,Maximization).GetHypervolume(OptimalParetoFront) ;
    66       }
     46    public override double[] ReferencePoint(int objectives) {
     47      return new double[] { 11, 11 };
    6748    }
    6849
     
    7051    protected Fonseca(bool deserializing) : base(deserializing) { }
    7152    protected Fonseca(Fonseca original, Cloner cloner) : base(original, cloner) { }
    72     public Fonseca() : base() { }
    73 
    7453    public override IDeepCloneable Clone(Cloner cloner) {
    7554      return new Fonseca(this, cloner);
    7655    }
     56    public Fonseca() : base() { }
    7757
    7858
    79 
    80     public override double[] Evaluate(RealVector r) {
     59    public override double[] Evaluate(RealVector r, int objectives) {
     60      if (objectives != 2) throw new ArgumentException("The Fonseca problem must always have 2 objectives");
    8161      double f0 = 0.0, aux = 1.0 / Math.Sqrt(r.Length);
    8262
     
    9979      return res;
    10080    }
     81
    10182  }
    10283}
  • branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/Kursawe.cs

    r13515 r13620  
    11using System;
     2using System.Collections.Generic;
    23using HeuristicLab.Common;
    34using HeuristicLab.Core;
     
    1112  public class Kursawe : MultiObjectiveTestFunction {
    1213
    13     public override DoubleMatrix Bounds {
    14       get {
    15         return new DoubleMatrix(new double[,] { { -5, 5 } });
    16       }
     14    public override double[,] Bounds(int objectives) {
     15      return new double[,] { { -5, 5 } };
    1716    }
    1817
    19     public override bool[] Maximization {
    20       get {
    21         return new bool[] { false, false };
    22       }
     18    public override bool[] Maximization(int objecitves) {
     19      return new bool[2];
    2320    }
    2421
    25     public override int MaximumProblemSize {
    26       get {
    27         return int.MaxValue;
    28       }
     22    public override int MinimumObjectives {
     23      get { return 2; }
     24    }
     25    public override int MaximumObjectives {
     26      get {return 2;}
    2927    }
    3028
    31     public override int MaximumSolutionSize {
    32       get {
    33         return 2;
    34       }
     29    public override int MinimumSolutionLength {
     30      get {return 3;}
     31    }
     32    public override int MaximumSolutionLength {
     33      get { return int.MaxValue; }
    3534    }
    3635
    37     public override int MinimumProblemSize {
    38       get {
    39         return 3;
    40       }
     36    public override IEnumerable<double[]> OptimalParetoFront(int objecitves) {
     37        return PFStore.get(this.ItemName);
    4138    }
    42 
    43     public override int MinimumSolutionSize {
    44       get {
    45         return 2;
    46       }
     39    public override double BestKnownHypervolume(int objecitves) {
     40        return new Hypervolume(ReferencePoint(objecitves), Maximization(2)).GetHypervolume(OptimalParetoFront(objecitves));
    4741    }
    48 
    49     public override int ActualSolutionSize {
    50       get {
    51         return 2;
    52       }
    53 
    54       set {
    55       }
    56     }
    57 
    58     public override RealVector[] OptimalParetoFront {
    59       get {
    60         return PFReader.getFromFile("Kursawe");
    61       }
    62     }
    63     public override double BestKnownHypervolume {
    64       get {
    65         return new Hypervolume(base.ReferencePoint, Maximization).GetHypervolume(OptimalParetoFront);
    66       }
     42    public override double[] ReferencePoint(int objectives) {
     43      return new double[] { 11, 11 };
    6744    }
    6845
     
    7047    protected Kursawe(bool deserializing) : base(deserializing) { }
    7148    protected Kursawe(Kursawe original, Cloner cloner) : base(original, cloner) { }
    72     public Kursawe() : base() { }
    73 
    7449    public override IDeepCloneable Clone(Cloner cloner) {
    7550      return new Kursawe(this, cloner);
    7651    }
     52    public Kursawe() : base() { }
     53
     54   
    7755
    7856
    7957
    80     public override double[] Evaluate(RealVector r) {
     58    public override double[] Evaluate(RealVector r, int objectives) {
     59      if (objectives != 2) throw new ArgumentException("The Kursawe problem must always have 2 objectives");
    8160      //objective 1
    8261      double f0 = 0.0;
  • branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/MultiObjectiveTestFunction.cs

    r13562 r13620  
    2020#endregion
    2121
    22 using System;
     22using System.Collections.Generic;
    2323using HeuristicLab.Common;
    2424using HeuristicLab.Core;
    25 using HeuristicLab.Data;
    2625using HeuristicLab.Encodings.RealVectorEncoding;
    2726using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    3736      double[] res = new double[size];
    3837      for(int i =0; i< size; i++) {
    39         res[i] = maximization[i] ? Double.MinValue : Double.MaxValue;
     38        res[i] = maximization[i] ? double.MinValue : double.MaxValue;
    4039      }
    4140      return res;
     
    5150    /// Returns whether the actual function constitutes a maximization or minimization problem.
    5251    /// </summary>
    53     public abstract bool[] Maximization { get; }
     52    public abstract bool[] Maximization(int objectives);
    5453    /// <summary>
    5554    /// Gets the lower and upper bound of the function.
    5655    /// </summary>
    57     public abstract DoubleMatrix Bounds { get; }
     56    public abstract double[,] Bounds(int objectives);
    5857    /// <summary>
    5958    /// Gets the minimum problem size.
    6059    /// </summary>
    61     public abstract int MinimumProblemSize { get; }
     60    public abstract int MinimumSolutionLength { get; }
    6261    /// <summary>
    6362    /// Gets the maximum problem size.
    6463    /// </summary>
    65     public abstract int MaximumProblemSize { get; }
     64    public abstract int MaximumSolutionLength { get; }
     65
     66
    6667    /// <summary>
    6768    /// Gets and sets the actual solution size.
    6869    /// </summary>
    69     public abstract int ActualSolutionSize { get; set; }
     70    ///
     71    [Storable]
     72    private int objectives;
    7073    /// <summary>
    7174    /// Gets the minimum solution size.
    7275    /// </summary>
    73     public abstract int MinimumSolutionSize { get; }
     76    public abstract int MinimumObjectives { get; }
    7477    /// <summary>
    7578    /// Gets the maximum solution size.
    7679    /// </summary>
    77     public abstract int MaximumSolutionSize { get; }
     80    public abstract int MaximumObjectives { get; }
    7881
    7982    /// <summary>
    8083    /// retrieves the optimal pareto front (if known from a file)
    8184    /// </summary>
    82     public abstract RealVector[] OptimalParetoFront { get; }
     85    public abstract IEnumerable<double[]> OptimalParetoFront(int objectives);
    8386
    8487
     
    8689    /// returns a Reference Point for Hypervolume calculation (currently default=(11|11))
    8790    /// </summary>
    88     public virtual RealVector ReferencePoint {
    89       get {
    90         return new RealVector(new double[]{ 11,11});
    91       }
    92     }
     91    public abstract double[] ReferencePoint(int objectives);
    9392
    9493
    9594    /// <summary>
    96     /// returns the best known Hypervolume for this Problem   (currently default=0)
    97     /// TODO BestKnownHypervolume is never updated 
     95    /// returns the best known Hypervolume for this Problem   (currently default=-1)
    9896    /// </summary>
    99     public virtual double BestKnownHypervolume {
    100       get {
    101         return 0;
    102       }
    103     }     
     97    public virtual double BestKnownHypervolume(int objectives) {
     98      return -1;
     99    }
    104100
    105101    [StorableConstructor]
    106102    protected MultiObjectiveTestFunction(bool deserializing) : base(deserializing) { }
    107     protected MultiObjectiveTestFunction(MultiObjectiveTestFunction original, Cloner cloner) : base(original, cloner) { }
     103    protected MultiObjectiveTestFunction(MultiObjectiveTestFunction original, Cloner cloner) : base(original, cloner) {
     104      this.objectives = original.objectives;
     105    }
    108106    protected MultiObjectiveTestFunction() : base() { }
    109107
     
    114112    /// <param name="point">N-dimensional point for which the test function should be evaluated.</param>
    115113    /// <returns>The result values of the function at the given point.</returns>
    116     public abstract double[] Evaluate(RealVector point);
     114    public abstract double[] Evaluate(RealVector point, int objectives);
    117115
    118116  }
  • branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/SchafferN1.cs

    r13515 r13620  
    1 using HeuristicLab.Common;
     1using System;
     2using System.Collections.Generic;
     3using HeuristicLab.Common;
    24using HeuristicLab.Core;
    35using HeuristicLab.Data;
     
    1012  public class SchafferN1 : MultiObjectiveTestFunction {
    1113
    12     public override DoubleMatrix Bounds {
    13       get {
    14         return new DoubleMatrix(new double[,] { { -1e5, 1e5 } });
    15       }
     14    public override double[,] Bounds(int objectives) {
     15      return new double[,] { { -1e5, 1e5 } };
    1616    }
    1717
    18     public override bool[] Maximization {
    19       get {
    20         return new bool[] { false, false };
    21       }
     18    public override bool[] Maximization(int objecitves) {
     19      return new bool[2];
    2220    }
    2321
    24     public override int MaximumProblemSize {
    25       get {
    26         return 1;
    27       }
     22    public override int MinimumSolutionLength {
     23      get { return 1; }
     24    }
     25    public override int MaximumSolutionLength {
     26      get { return 1; }
    2827    }
    2928
    30     public override int MaximumSolutionSize {
    31       get {
    32         return 2;
    33       }
     29
     30    public override int MinimumObjectives {
     31      get { return 2; }
    3432    }
    3533
    36     public override int MinimumProblemSize {
    37       get {
    38         return 1;
    39       }
     34    public override int MaximumObjectives {
     35      get { return 2; }
    4036    }
    4137
    42     public override int MinimumSolutionSize {
    43       get {
    44         return 2;
    45       }
     38
     39    public override double[] ReferencePoint(int objecitves) {
     40        return new double[] { 1e5, 1e5 };
    4641    }
    4742
    48     public override int ActualSolutionSize {
    49       get {
    50         return 2;
    51       }
    5243
    53       set {
    54       }
     44    public override IEnumerable<double[]> OptimalParetoFront(int objecitves) {
     45        return PFStore.get("Schaffer");
    5546    }
     47    public override double BestKnownHypervolume(int objecitves) {
     48        return new Hypervolume(ReferencePoint(objecitves), Maximization(2)).GetHypervolume(OptimalParetoFront(objecitves));
    5649
    57     public override RealVector[] OptimalParetoFront {
    58       get {
    59         return PFReader.getFromFile("SchafferN1");
    60       }
    61     }
    62     public override double BestKnownHypervolume {
    63       get {
    64         return new Hypervolume(base.ReferencePoint, Maximization).GetHypervolume(OptimalParetoFront);
    65       }
    6650    }
    6751
     
    6953    protected SchafferN1(bool deserializing) : base(deserializing) { }
    7054    protected SchafferN1(SchafferN1 original, Cloner cloner) : base(original, cloner) { }
    71     public SchafferN1() : base() { }
    72 
    7355    public override IDeepCloneable Clone(Cloner cloner) {
    7456      return new SchafferN1(this, cloner);
    7557    }
    7658
     59    public SchafferN1() : base() { }
    7760
    7861
    79     public override double[] Evaluate(RealVector r) {
     62
     63
     64
     65    public override double[] Evaluate(RealVector r, int objectives) {
     66      if (objectives != 2) throw new ArgumentException("The Schaffer N1 problem must always have 2 objectives");
    8067      if (r.Length != 1) return null;
    8168      double x = r[0];
     
    8875      f1 *= f1;
    8976
    90      return new double[] { f0, f1 };
     77      return new double[] { f0, f1 };
    9178    }
    9279  }
  • branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/SchafferN2.cs

    r13515 r13620  
    11using System;
     2using System.Collections.Generic;
    23using HeuristicLab.Common;
    34using HeuristicLab.Core;
     
    1112  public class SchafferN2 : MultiObjectiveTestFunction {
    1213
    13     public override DoubleMatrix Bounds {
    14       get {
    15         return new DoubleMatrix(new double[,] { { -5, 10 } });
    16       }
     14    public override double[,] Bounds(int objectives) {
     15      return new double[,] { { -5, 10 } };
    1716    }
    1817
    19     public override bool[] Maximization {
    20       get {
    21         return new bool[] { false, false };
    22       }
     18    public override bool[] Maximization(int objecitves) {
     19      return new bool[2];
    2320    }
    2421
    25     public override int MaximumProblemSize {
    26       get {
    27         return 1;
    28       }
     22    public override int MinimumSolutionLength {
     23      get { return 1; }
    2924    }
    3025
    31     public override int MaximumSolutionSize {
    32       get {
    33         return 2;
    34       }
     26    public override int MaximumSolutionLength {
     27      get { return 1; }
    3528    }
    3629
    37     public override int MinimumProblemSize {
    38       get {
    39         return 1;
    40       }
     30    public override int MinimumObjectives {
     31      get { return 2; }
    4132    }
    4233
    43     public override int MinimumSolutionSize {
    44       get {
    45         return 2;
    46       }
     34    public override int MaximumObjectives {
     35      get { return 2; }
    4736    }
    4837
    49     public override int ActualSolutionSize {
    50       get {
    51         return 2;
    52       }
    53 
    54       set {
    55       }
     38    public override double[] ReferencePoint(int objecitves) {
     39      return new double[] { 100, 100 };
    5640    }
    5741
    58     public override RealVector[] OptimalParetoFront {
    59       get {
    60         throw new NotImplementedException();
    61       }
     42
     43    public override IEnumerable<double[]> OptimalParetoFront(int objectives) {
     44      throw new NotImplementedException();
    6245    }
    6346
     
    6548    protected SchafferN2(bool deserializing) : base(deserializing) { }
    6649    protected SchafferN2(SchafferN2 original, Cloner cloner) : base(original, cloner) { }
    67     public SchafferN2() : base() { }
    68 
    6950    public override IDeepCloneable Clone(Cloner cloner) {
    7051      return new SchafferN2(this, cloner);
    7152    }
    7253
     54    public SchafferN2() : base() { }
    7355
    7456
    75     public override double[] Evaluate(RealVector r) {
     57
     58
     59
     60    public override double[] Evaluate(RealVector r, int objectives) {
     61      if (objectives != 2) throw new ArgumentException("The Schaffer N1 problem must always have 2 objectives");
    7662      double x = r[0];
    7763
Note: See TracChangeset for help on using the changeset viewer.