Index: /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Comparators/Crowding.cs
===================================================================
--- /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Comparators/Crowding.cs	(revision 13562)
+++ /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Comparators/Crowding.cs	(revision 13562)
@@ -0,0 +1,93 @@
+﻿using System;
+using System.Collections.Generic;
+using HeuristicLab.Encodings.RealVectorEncoding;
+
+namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
+
+  /// <summary>
+  /// Crowding distance d(x,A) is usually defined between a point x and a set of points  A
+  /// 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
+  /// 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 
+  /// C(A) = mean(x,A) where x in A
+  /// </summary>
+  public class Crowding : IMultiObjectiveDistance {
+    private double[][] bounds;
+    public Crowding(double[][] bounds) {
+      this.bounds = bounds;
+    }
+
+
+    public static double GetDistance(RealVector[] front, RealVector[] optimalFront, double[][] bounds) {
+      return new Crowding(bounds).Compare(front, optimalFront);
+    }
+
+
+    public static double GetCrowding(RealVector[] front, double[][] bounds) {
+      return new Crowding(bounds).Get(front);
+    }
+
+
+    public double Get(RealVector[] front) {
+      double sum = 0;
+      foreach(RealVector point in front) {
+        sum += CalcCrowding(point, front);
+      }
+      return sum / front.Length;
+    }
+
+    public double Compare(RealVector[] front, RealVector[] optimalFront) {
+      return Get(optimalFront) - Get(front);
+    }
+
+    private double CalcCrowding(RealVector point, RealVector[] list) {
+      double sum = 0;
+      for (int i = 0; i < point.Length; i++) {
+        sum += CalcCrowding(point, list, i);
+      }
+      return sum;
+    }
+
+    private double CalcCrowding(RealVector point, RealVector[] list, int dim) {
+      double fmax = bounds[dim % bounds.Length][1];
+      double fmin = bounds[dim % bounds.Length][0];
+
+      Array.Sort<RealVector>(list, new DimensionComparer(dim, false));
+      if (list[0][dim] == point[0] || list[list.Length - 1][dim] == point[0]) return Double.PositiveInfinity;
+      int pos = binarySearch(point[dim], list, dim);
+      return (list[pos + 1][dim] - list[pos - 1][dim] )/ (fmax - fmin);
+    }
+
+    private int binarySearch(double x, RealVector[] list, int dim) {
+      int low = 0;
+      int high = list.Length - 1;
+      while (high >= low) {
+        int middle = (low + high) / 2;
+        if (list[middle][dim] == x) return middle;
+        if (list[middle][dim] < x)  low = middle + 1;
+        if (list[middle][dim] > x)  high = middle - 1; 
+      }
+      return -1; //This should never happen
+    }
+
+    private class DimensionComparer : IComparer<RealVector> {
+      private int dim;
+      private int descending;
+
+      public DimensionComparer(int dimension, bool descending) {
+        this.dim = dimension;
+        this.descending = descending ? -1 : 1;
+      }
+
+      #region IComparer<DoubleArray> Members
+
+      public int Compare(RealVector x, RealVector y) {
+        if (x[dim] < y[dim]) return -descending;
+        else if (x[dim] > y[dim]) return descending;
+        else return 0;
+      }
+
+      #endregion
+    }
+
+  }
+}
Index: /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Comparators/GenerationalDistance.cs
===================================================================
--- /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Comparators/GenerationalDistance.cs	(revision 13562)
+++ /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Comparators/GenerationalDistance.cs	(revision 13562)
@@ -0,0 +1,47 @@
+﻿using System;
+using HeuristicLab.Encodings.RealVectorEncoding;
+
+namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
+
+  /// <summary>
+  /// The generational Distance is defined as the mean of a all d[i]^(1/p),
+  ///  where d[i] is the minimal distance the ith point of the evaluated front has to any point in the optimal pareto front.   
+  /// </summary>
+  public class GenerationalDistance : IMultiObjectiveDistance {
+    private double p; //dampening Factor
+
+    public GenerationalDistance(double p) {
+      this.p = 1 / p;
+    }
+
+
+    public static double GetDistance(RealVector[] front, RealVector[] optimalFront, double p) {
+     return new GenerationalDistance(p).Compare(front,optimalFront);
+    }
+
+    public double Compare(RealVector[] front, RealVector[] optimalFront) {
+     //TODO build a kd-tree, sort the array, do someting intelligent here
+     double sum = 0;
+      if (front.Length == 0 || optimalFront.Length == 0) throw new Exception("Both Fronts need to contain at least one point");
+     foreach(RealVector r in front) {
+        sum += minDistance(r, optimalFront);
+      }
+      return Math.Pow(sum, p) /front.Length;
+    }
+
+    private double minDistance(RealVector point, RealVector[] list) {
+      //TODO inefficient
+      double min = Double.MaxValue;
+      foreach (RealVector r in list) {
+        if (r == point) continue;
+        double d = 0;
+        for (int i = 0; i < r.Length; i++) {
+          d += (point[i] - r[i]) * (point[i] - r[i]);
+        }
+        min = Math.Min(d, min);
+      }
+      return Math.Sqrt(min);
+    }
+
+  }
+}
Index: /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Comparators/HyperVolume.cs
===================================================================
--- /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Comparators/HyperVolume.cs	(revision 13562)
+++ /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Comparators/HyperVolume.cs	(revision 13562)
@@ -0,0 +1,97 @@
+﻿using System;
+using System.Collections.Generic;
+using HeuristicLab.Encodings.RealVectorEncoding;
+
+namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
+  /// <summary>
+  /// The Hyprevolume-metric is defined as the Hypervolume enclosed between a given reference point,
+  /// that is fixed for every evaluation function and the evaluated front.
+  /// 
+  /// Example:
+  /// r is the reference Point at (1|1)  and every Point p is part of the evaluated front
+  /// The filled Area labled HV is the 2 diensional Hypervolume enclosed by this front. 
+  /// 
+  /// (0|1)                (1|1)
+  ///   +      +-------------r
+  ///   |      |###### HV ###|
+  ///   |      p------+######|
+  ///   |             p+#####|
+  ///   |              |#####|
+  ///   |              p-+###|
+  ///   |                p---+
+  ///   |                 
+  ///   +--------------------1
+  /// (0|0)                (1|0)
+  /// 
+  ///  Please note that in this example both dimensions are minimized. The reference Point need to be dominated by EVERY point in the evaluated front 
+  /// 
+  /// </summary>
+  public class Hypervolume : IMultiObjectiveDistance {
+
+    private RealVector reference;
+    private bool[] maximization;
+    public Hypervolume(RealVector reference, bool[] maximization) {
+      if (reference.Length != 2) throw new Exception("Only 2-dimensional cases are supported yet");
+      this.reference = reference;
+      this.maximization = maximization;
+    }
+
+    public double Compare(RealVector[] front, RealVector[] optimalFront) {
+      return GetHypervolume(optimalFront) - GetHypervolume(front);
+
+    }
+
+    public double GetHypervolume(RealVector[] front) {
+      //TODO what to do if set contains dominated points
+      front = (RealVector[])front.Clone(); //TODO this seems shady
+      Array.Sort<RealVector>(front, new DimensionComparer(0, maximization[0]));
+      RealVector last = front[front.Length - 1];
+      CheckConsistency(last, 0);
+      CheckConsistency(last, 1);
+      double sum = 0;
+      for (int i = 0; i < front.Length - 1; i++) {
+        CheckConsistency(front[i], 1);
+        sum += Math.Abs((front[i][0] - front[i + 1][0])) * Math.Abs((front[i][1] - reference[1]));
+      }
+
+      sum += Math.Abs(reference[0] - last[0]) * Math.Abs(reference[1] - last[1]);
+      return sum;
+    }
+
+    public static double GetHypervolume(RealVector[] front, RealVector reference, bool[] maximization){
+      Hypervolume comp = new Hypervolume(reference, maximization);
+      return comp.GetHypervolume(front);
+    }
+
+    public static double GetDistance(RealVector[] front, RealVector[] optimalFront, RealVector reference, bool[] maximization) {
+      return GetHypervolume(optimalFront, reference, maximization) - GetHypervolume(front, reference, maximization);
+    }
+
+    private void CheckConsistency(RealVector point, int dim) {
+      if (!maximization[dim] && point[dim] > reference[dim]) throw new Exception("Reference Point must be dominated by all points of the front");
+      if (maximization[dim] && point[dim] < reference[dim]) throw new Exception("Reference Point must be dominated by all points of the front");
+      if (point.Length != 2) throw new Exception("Only 2-dimensional cases are supported yet");
+    }
+
+    private class DimensionComparer : IComparer<RealVector> {
+      private int dim;
+      private int descending;
+
+      public DimensionComparer(int dimension, bool descending) {
+        this.dim = dimension;
+        this.descending = descending ? -1 : 1;
+      }
+
+      #region IComparer<DoubleArray> Members
+
+      public int Compare(RealVector x, RealVector y) {
+        if (x[dim] < y[dim]) return -descending;
+        else if (x[dim] > y[dim]) return descending;
+        else return 0;
+      }
+
+      #endregion
+    }
+
+  }
+}
Index: /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Comparators/HyperVolumeFast.cs
===================================================================
--- /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Comparators/HyperVolumeFast.cs	(revision 13562)
+++ /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Comparators/HyperVolumeFast.cs	(revision 13562)
@@ -0,0 +1,234 @@
+﻿using System;
+using System.Collections.Generic;
+using HeuristicLab.Encodings.RealVectorEncoding;
+
+namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
+  /// <summary>
+  /// The Hyprevolume-metric is defined as the Hypervolume enclosed between a given reference point,
+  /// that is fixed for every evaluation function and the evaluated front.
+  /// 
+  /// Example:
+  /// r is the reference Point at (1|1)  and every Point p is part of the evaluated front
+  /// The filled Area labled HV is the 2 diensional Hypervolume enclosed by this front. 
+  /// 
+  /// (0|1)                (1|1)
+  ///   +      +-------------r
+  ///   |      |###### HV ###|
+  ///   |      p------+######|
+  ///   |             p+#####|
+  ///   |              |#####|
+  ///   |              p-+###|
+  ///   |                p---+
+  ///   |                 
+  ///   +--------------------1
+  /// (0|0)                (1|0)
+  /// 
+  ///  Please note that in this example both dimensions are minimized. The reference Point need to be dominated by EVERY point in the evaluated front 
+  /// 
+  /// </summary>
+  public class FastHypervolume {
+
+    private RealVector reference;
+    private bool[] maximization;
+    public FastHypervolume(RealVector reference, bool[] maximization) {
+      if (reference.Length != 2) throw new Exception("Only 2-dimensional cases are supported yet");
+      this.reference = reference;
+      this.maximization = maximization;
+    }
+
+    public double Compare(RealVector[] front, RealVector[] optimalFront, double[][] bounds) {
+      return GetHypervolume(optimalFront, bounds) - GetHypervolume(front, bounds);
+
+    }
+
+
+    /// <summary>
+    /// 
+    /// </summary>
+    /// <param name="front"></param>
+    /// <param name="bounds">also called region</param>
+    /// <returns></returns>
+    public double GetHypervolume(RealVector[] front, double[][] bounds) {
+      //TODO what to do if set contains dominated points
+      var list = new List<RealVector>();
+      list.AddRange(front);
+      list.Sort(new DimensionComparer(reference.Length - 1, maximization[reference.Length - 1]));
+      var results = new ExPrivates(this);
+      GetHV(DeepClone(bounds), list, 1, reference[reference.Length - 1], results);
+      return results.Volume;
+
+    }
+
+    private double[][] DeepClone(double[][] array) {
+      double[][] copy = new double[array.Length][];
+      for (int i = 0; i < copy.Length; i++) {
+        copy[i] = new double[array[i].Length];
+        for (int j = 0; i < array[i].Length; j++) {
+          copy[i][j] = array[i][j];
+        }
+      }
+      return copy;
+    }
+
+    private class ExPrivates {
+      private double volume;
+      public double Volume {
+        get { return volume; }
+        set { volume = value; }
+      }
+      private int d;
+
+      public int D {
+        get { return D; }
+      }
+      public ExPrivates(FastHypervolume hv) {
+        volume = 0;
+        d = hv.reference.Length;
+      }
+
+
+
+    }
+
+    private void GetHV(double[][] region, List<RealVector> points, int split, double cover, ExPrivates results) {
+      double coverNew = cover;
+      int coverIndex = 1;
+      bool allPiles = true;
+      int bound = -1;
+
+      /* is the region completely covered? */
+      while (coverNew == cover && coverIndex != points.Count) {
+        if (covers(points[coverIndex], region, results)) {
+          coverNew = points[coverIndex][results.D];
+          results.Volume += getMeasure(region) * (cover - coverNew);
+        } else { }
+        coverIndex++;
+      }
+      if (coverIndex == 1) return;
+
+      for (int i = 1; i < coverIndex; i++) { if (checkPile(points[i], region) == -1) allPiles = false; }
+
+      if (allPiles) {
+        /* calculate volume by sweeping along dimension d */
+        var trellis = new double[reference.Length];
+        int i = 1;
+        for (int j = 1; j < results.D; j++) trellis[j] = reference[j];
+
+        double next;//bernhard
+        do {
+          double current = points[i][results.D];
+          do {
+            int pile = getPile(points[i], region);
+            if (points[i][pile] < trellis[pile]) trellis[pile] = points[i][pile];
+            i++;
+            if (i < coverIndex - 1) next = points[i][results.D]; else next = coverNew;
+          } while (current == next);
+          results.Volume += measure(trellis, region) * (next - current);
+        } while (next != coverNew);
+
+      } else {
+        /* split region in two children regions */
+        do {
+          var intersect = new List<Double>(); var nonIntersect = new List<Double>();
+          for (int i = 1; i < coverIndex; i++) {
+            var intersection = intersects(points[i], region, split);
+            if (intersection == 1) intersect.Add(points[i][split]);
+            if (intersection == 0) nonIntersect.Add(points[i][split]);
+          }
+          if (intersect.Count != 0) bound = median(intersect);
+          else if (nonIntersect.Count > Math.Sqrt(n)) bound = median(nonIntersect);
+          else split++;
+        } while (bound == -1);
+      }
+
+
+      var regionC = DeepClone(region);
+      regionC[split][1] = bound;
+      var pointsC = new List<RealVector>();
+      for (int i = 1; i < coverIndex; i++) {
+        if (partCovers(points[i], regionC, results)) move(points[i], pointsC);
+      }
+      if (pointsC.Count != 0) GetHV(regionC, pointsC, split, coverNew, results);
+      reinsert(pointsC, points);
+      regionC = region;
+      regionC[split][0] = bound;
+      pointsC = new List<RealVector>();
+      for (int i = 1; i < coverIndex; i++) {
+        if (partCovers(points[i], regionC, results)) move(points[i], pointsC);
+      }
+      if (pointsC.Count != 0) GetHV(regionC, pointsC, split, coverNew, results);
+      reinsert(pointsC, points);
+    }
+
+    private int checkPile(RealVector point, double[][] region, ExPrivates results) {
+      int pile = -1;
+      for (int j = 1; j < results.D; j++) {
+        if (point[j] > region[j][0]) {
+          if (pile != -1) return -1;
+        }
+        pile = j;
+      }
+      return pile;
+
+    }
+
+    private int intersects(RealVector point, double[][] region, int split) {
+      if (region[split][0] >= point[split]) return -1;
+      for (int j = 1; j < split; j++) {
+        if (point[j] > region[j][0]) return 1;
+      }
+      return 0;
+
+    }
+
+    private bool covers(RealVector point, double[][] region, ExPrivates results) {
+      for (int j = 1; j < results.D; j++) {
+        if (point[j] > region[j][0]) return false;
+      }
+      return true;
+
+    }
+
+    private bool partCovers(RealVector point, double[][] region, ExPrivates results) {
+      for (int j = 1; j < results.D; j++) {
+        if (point[j] >= region[j][1]) return false;
+      }
+      return true;
+    }
+
+    public static double GetHypervolume(RealVector[] front, RealVector reference, bool[] maximization) {
+      Hypervolume comp = new Hypervolume(reference, maximization);
+      return comp.GetHypervolume(front);
+    }
+
+    public static double GetDistance(RealVector[] front, RealVector[] optimalFront, RealVector reference, bool[] maximization) {
+      return GetHypervolume(optimalFront, reference, maximization) - GetHypervolume(front, reference, maximization);
+    }
+
+    private void CheckConsistency(RealVector point, int dim) {
+      if (!maximization[dim] && point[dim] > reference[dim]) throw new Exception("Reference Point must be dominated by all points of the front");
+      if (maximization[dim] && point[dim] < reference[dim]) throw new Exception("Reference Point must be dominated by all points of the front");
+    }
+
+    private class DimensionComparer : IComparer<RealVector> {
+      private int dim;
+      private int descending;
+
+      public DimensionComparer(int dimension, bool descending) {
+        this.dim = dimension;
+        this.descending = descending ? -1 : 1;
+      }
+
+      #region IComparer<DoubleArray> Members
+
+      public int Compare(RealVector x, RealVector y) {
+        if (x[dim] < y[dim]) return -descending;
+        else if (x[dim] > y[dim]) return descending;
+        else return 0;
+      }
+
+      #endregion
+    }
+
+  }
+}
Index: /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Comparators/InvertedGenerationalDistance.cs
===================================================================
--- /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Comparators/InvertedGenerationalDistance.cs	(revision 13562)
+++ /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Comparators/InvertedGenerationalDistance.cs	(revision 13562)
@@ -0,0 +1,54 @@
+﻿using System;
+using HeuristicLab.Encodings.RealVectorEncoding;
+
+namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
+  /// <summary>
+  /// The inverted generational Distance is defined as the mean of a all d[i]^(1/p),
+  ///  where d[i] is the minimal distance the ith point of the optimal pareto front has to any point in the evaluated front.   
+  /// </summary>
+  public class InvertedGenerationalDistance : IMultiObjectiveDistance {
+    private double p;
+
+    public InvertedGenerationalDistance(double p) {
+      this.p = 1 / p;
+    }
+
+
+
+    /// <summary>
+    /// 
+    /// </summary>
+    /// <param name="front"></param>
+    /// <param name="optimalFront"></param>
+    /// <param name="p"></param>
+    /// <returns></returns>
+    public static double GetDistance(RealVector[] front, RealVector[] optimalFront, double p) {
+      return new InvertedGenerationalDistance(p).Compare(front, optimalFront);
+    }
+
+    public double Compare(RealVector[] front, RealVector[] optimalFront) {
+      //TODO build a kd-tree, sort the array, do someting intelligent here
+      double sum = 0;
+      if (front.Length == 0 || optimalFront.Length == 0) throw new Exception("Both Fronts need to contain at least one point");
+      foreach (RealVector r in optimalFront) {
+        sum += minDistance(r, front);
+      }
+      return Math.Pow(sum, p) / optimalFront.Length;
+    }
+
+    private double minDistance(RealVector point, RealVector[] list) {
+      //TODO inefficient
+      double min = Double.MaxValue;
+      foreach (RealVector r in list) {
+        if (r == point) continue;
+        double d = 0;
+        for (int i = 0; i < r.Length; i++) {
+          d += (point[i] - r[i]) * (point[i] - r[i]);
+        }
+        min = Math.Min(d, min);
+      }
+      return Math.Sqrt(min);
+    }
+
+  }
+}
Index: /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Comparators/Spacing.cs
===================================================================
--- /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Comparators/Spacing.cs	(revision 13562)
+++ /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Comparators/Spacing.cs	(revision 13562)
@@ -0,0 +1,64 @@
+﻿using System;
+using HeuristicLab.Encodings.RealVectorEncoding;
+
+namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
+
+
+  /// <summary>
+  /// Spacing is defined as the standarddeviation of all d[i] 
+  /// where d[i] is the minimum eukildean distance any point has 
+  /// to all OTHER points in the same front 
+  /// </summary>
+  public class Spacing : IMultiObjectiveDistance {
+
+    public Spacing() { }
+
+
+    public static double GetSpacing(RealVector[] front) {
+      return new Spacing().Get(front);
+    }
+    public static double GetDistance(RealVector[] front, RealVector[] optimalFront) {
+      return new Spacing().Get(front);
+    }
+
+    public double Compare(RealVector[] front, RealVector[] optimalFront) {
+      return GetSpacing(front) - GetSpacing(optimalFront);
+    }
+
+    public double Get(RealVector[] front) {
+      //TODO build a kd-tree, sort the array, do someting intelligent here
+      double sum = 0;
+      if (front.Length == 0) throw new Exception("Front does not contain any points");
+      double[] d = new double[front.Length];
+      int i = 0;
+      foreach (RealVector r in front) {
+        d[i] = minDistance(r, front);
+        sum += d[i++];
+
+      }
+      double mean = sum / front.Length;
+      sum = 0;
+      foreach (double e in d) {
+        sum += (e - mean) * (e - mean);
+      }
+      sum /= front.Length;
+      return Math.Sqrt(sum);
+
+    }
+
+    private double minDistance(RealVector point, RealVector[] list) {
+      //TODO inefficient
+      double min = Double.MaxValue;
+      foreach (RealVector r in list) {
+        if (r == point) continue;
+        double d = 0;
+        for (int i = 0; i < r.Length; i++) {
+          d += (point[i] - r[i]) * (point[i] - r[i]);
+        }
+        min = Math.Min(d, min);
+      }
+      return Math.Sqrt(min);
+    }
+
+  }
+}
Index: /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Interfaces/IMultiObjectiveDistance.cs
===================================================================
--- /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Interfaces/IMultiObjectiveDistance.cs	(revision 13562)
+++ /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Interfaces/IMultiObjectiveDistance.cs	(revision 13562)
@@ -0,0 +1,15 @@
+﻿using HeuristicLab.Encodings.RealVectorEncoding;
+
+namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
+  public interface IMultiObjectiveDistance {
+
+    /// <summary>
+    /// all points in front and optimalFront are considered to be non-dominated within their own set.
+    /// </summary>
+    /// <param name="front"> an array of 2-dimensional? RealVectors that denote the set that will be evaluated</param>
+    /// <param name="optimalFront">an array of 2-dimensional? RealVectors that denote the optimal Pareto front for a given Problem</param>
+    /// <returns></returns>
+    double Compare(RealVector[] front, RealVector[] optimalFront);
+
+  }
+}
Index: /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/NonDominatedSelect.cs
===================================================================
--- /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/NonDominatedSelect.cs	(revision 13562)
+++ /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/NonDominatedSelect.cs	(revision 13562)
@@ -0,0 +1,135 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Collections.Generic;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.RealVectorEncoding;
+
+namespace HeuristicLab.Problems.MultiObjectiveTestFunction {
+
+  public class NonDominatedSelect {
+    private enum DominationResult { Dominates, IsDominated, IsNonDominated };
+
+
+    public static RealVector[] selectNonDominatedVectors(RealVector[] qualities, bool[] maximization, bool dominateOnEqualQualities) {
+      int populationSize = qualities.Length;
+
+      List<RealVector> front = new List<RealVector>();
+      foreach (RealVector row in qualities) {
+        bool insert = true;
+        for (int i = 0; i < front.Count; i++) {
+          DominationResult res = Dominates(front[i], row, maximization, dominateOnEqualQualities);
+          if (res == DominationResult.Dominates) { insert = false; break; }           //Vector domiates Row
+          else if (res == DominationResult.IsDominated) {   //Row dominates Vector
+            front.RemoveRange(i, 1);
+          }
+        }
+        if (insert) {
+          front.Add(new RealVector(row));
+        }
+      }
+
+      return front.ToArray();
+    }
+
+    public static RealVector[] selectNonDominatedRows(double[][] qualities, bool[] maximization, bool dominateOnEqualQualities) {
+      int populationSize = qualities.Length;
+
+      List<RealVector> front = new List<RealVector>();
+      foreach (double[] row in qualities) {
+        bool insert = true;
+        for (int i = 0; i < front.Count; i++) {
+          DominationResult res = Dominates(front[i], row, maximization, dominateOnEqualQualities);
+          if (res == DominationResult.Dominates) { insert = false; break; }           //Vector domiates Row
+          else if (res == DominationResult.IsDominated) {   //Row dominates Vector
+            front.RemoveRange(i, 1);
+          } 
+        }
+        if (insert) {
+          front.Add(new RealVector(row));
+        }
+      }
+
+      return front.ToArray();
+    }
+
+    private static DominationResult Dominates(RealVector left, double[] right, bool[] maximizations, bool dominateOnEqualQualities) {
+      //mkommend Caution: do not use LINQ.SequenceEqual for comparing the two quality arrays (left and right) due to performance reasons
+      if (dominateOnEqualQualities) {
+        var equal = true;
+        for (int i = 0; i < left.Length; i++) {
+          if (left[i] != right[i]) {
+            equal = false;
+            break;
+          }
+        }
+        if (equal) return DominationResult.Dominates;
+      }
+
+      bool leftIsBetter = false, rightIsBetter = false;
+      for (int i = 0; i < left.Length; i++) {
+        if (IsDominated(left[i], right[i], maximizations[i])) rightIsBetter = true;
+        else if (IsDominated(right[i], left[i], maximizations[i])) leftIsBetter = true;
+        if (leftIsBetter && rightIsBetter) break;
+      }
+
+      if (leftIsBetter && !rightIsBetter) return DominationResult.Dominates;
+      if (!leftIsBetter && rightIsBetter) return DominationResult.IsDominated;
+      return DominationResult.IsNonDominated;
+    }
+
+    private static DominationResult Dominates(RealVector left, RealVector right, bool[] maximizations, bool dominateOnEqualQualities) {
+      //mkommend Caution: do not use LINQ.SequenceEqual for comparing the two quality arrays (left and right) due to performance reasons
+      if (dominateOnEqualQualities) {
+        var equal = true;
+        for (int i = 0; i < left.Length; i++) {
+          if (left[i] != right[i]) {
+            equal = false;
+            break;
+          }
+        }
+        if (equal) return DominationResult.Dominates;
+      }
+
+      bool leftIsBetter = false, rightIsBetter = false;
+      for (int i = 0; i < left.Length; i++) {
+        if (IsDominated(left[i], right[i], maximizations[i])) rightIsBetter = true;
+        else if (IsDominated(right[i], left[i], maximizations[i])) leftIsBetter = true;
+        if (leftIsBetter && rightIsBetter) break;
+      }
+
+      if (leftIsBetter && !rightIsBetter) return DominationResult.Dominates;
+      if (!leftIsBetter && rightIsBetter) return DominationResult.IsDominated;
+      return DominationResult.IsNonDominated;
+    }
+
+    private static bool IsDominated(double left, double right, bool maximization) {
+      return maximization && left < right
+        || !maximization && left > right;
+    }
+
+    private static void AddToFront(IScope p, List<ScopeList> fronts, int i) {
+      if (i == fronts.Count) fronts.Add(new ScopeList());
+      fronts[i].Add(p);
+    }
+
+  }
+}
Index: /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/PFReader.cs
===================================================================
--- /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/PFReader.cs	(revision 13562)
+++ /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/PFReader.cs	(revision 13562)
@@ -0,0 +1,38 @@
+﻿using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using HeuristicLab.Encodings.RealVectorEncoding;
+
+namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
+  class PFReader {
+
+    //TODO exception handling
+    public static RealVector[] getFromFile(String filename) {
+      double[] data = null; 
+      switch (filename) {
+        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;
+        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;
+        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;
+
+        default: break;
+      }
+      if (data == null) throw new NotImplementedException();
+      RealVector[] front = new RealVector[data.Length / 2];
+      for(int i = 0; i < data.Length; i += 2) {
+        front[i / 2] = new RealVector(2);
+        front[i / 2][0] = data[i];
+        front[i / 2][1] = data[i + 1];
+      }
+
+      return front;
+    }
+
+
+    
+
+
+  }
+}
Index: /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/MultiObjectiveTestFunction.cs
===================================================================
--- /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/MultiObjectiveTestFunction.cs	(revision 13561)
+++ /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/MultiObjectiveTestFunction.cs	(revision 13562)
@@ -82,4 +82,8 @@
     public abstract RealVector[] OptimalParetoFront { get; }
 
+
+    /// <summary>
+    /// returns a Reference Point for Hypervolume calculation (currently default=(11|11))
+    /// </summary>
     public virtual RealVector ReferencePoint {
       get {
@@ -88,9 +92,14 @@
     }
 
+
+    /// <summary>
+    /// returns the best known Hypervolume for this Problem   (currently default=0)
+    /// TODO BestKnownHypervolume is never updated  
+    /// </summary>
     public virtual double BestKnownHypervolume {
       get {
         return 0;
       }
-    }
+    }     
 
     [StorableConstructor]
