Index: /branches/HeuristicLab.Analysis.AlgorithmBehavior/AlgorithmBehaviorUnitTests/LPConvexHullTest.cs
===================================================================
--- /branches/HeuristicLab.Analysis.AlgorithmBehavior/AlgorithmBehaviorUnitTests/LPConvexHullTest.cs	(revision 10223)
+++ /branches/HeuristicLab.Analysis.AlgorithmBehavior/AlgorithmBehaviorUnitTests/LPConvexHullTest.cs	(revision 10224)
@@ -21,5 +21,4 @@
 
 using System;
-using System.Collections.Generic;
 using System.Diagnostics;
 using System.Linq;
@@ -36,5 +35,4 @@
       int sampleSize = 2;
       double[][] inputs = ConvexHullTest.CreateRandomData(nrOfSamples, sampleSize);
-      var convAlgData = ConvertPermutationToVertex(inputs);
 
       Stopwatch watch = new Stopwatch();
@@ -44,5 +42,5 @@
       Console.WriteLine("LPHull: " + watch.ElapsedMilliseconds);
       watch.Restart();
-      var result1 = ConvexHull.Create(convAlgData).Points.Select(x => x.Position).ToList();
+      var result1 = ConvexHull.Create(inputs).Points.Select(x => x.Position).ToList();
       watch.Stop();
       Console.WriteLine("MIConvexHull: " + watch.ElapsedMilliseconds);
@@ -140,15 +138,4 @@
       return result;
     }
-
-    private List<DefaultVertex> ConvertPermutationToVertex(double[][] data) {
-      List<DefaultVertex> result = new List<DefaultVertex>();
-      for (int i = 0; i < data.Count(); i++) {
-        double[] d = data[i];
-        DefaultVertex vertex = new DefaultVertex();
-        vertex.Position = d;
-        result.Add(vertex);
-      }
-      return result;
-    }
   }
 }
Index: /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3/PermutationConvexHullView.cs
===================================================================
--- /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3/PermutationConvexHullView.cs	(revision 10223)
+++ /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3/PermutationConvexHullView.cs	(revision 10224)
@@ -56,5 +56,5 @@
         double[][] popPoints = DistanceMatrixToPoints.ConvertDistanceMatrixToPoints(DistanceMatrixToPoints.TransformToDistances(dm));
 
-        var convexHull = HyperHull.CalculateUsingSMO(popPoints);
+        var convexHull = HyperHull.Calculate(popPoints);
         resultsTextBox.Text += "Nr. of Points in Generation " + i + ": " + convexHull.Count + Environment.NewLine;
         resultsTextBox.Text += "Volume of Convex Hull in Generation " + i + " is: " +
Index: /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/HyperHull.cs
===================================================================
--- /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/HyperHull.cs	(revision 10223)
+++ /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/HyperHull.cs	(revision 10224)
@@ -30,5 +30,5 @@
   /// </summary>
   public class HyperHull {
-    public static List<double[]> CalculateUsingSMO(double[][] inputs) {
+    public static List<double[]> Calculate(double[][] inputs) {
       int[] labels = new int[inputs.Count()];
       List<double[]> result = new List<double[]>();
Index: /branches/HeuristicLab.Analysis.AlgorithmBehavior/PerformanceTests/PerformanceTests.csproj
===================================================================
--- /branches/HeuristicLab.Analysis.AlgorithmBehavior/PerformanceTests/PerformanceTests.csproj	(revision 10223)
+++ /branches/HeuristicLab.Analysis.AlgorithmBehavior/PerformanceTests/PerformanceTests.csproj	(revision 10224)
@@ -50,4 +50,8 @@
       <Name>HeuristicLab.Analysis.AlgorithmBehavior.Analyzers-3.3</Name>
     </ProjectReference>
+    <ProjectReference Include="..\MIConvexHull\MIConvexHull.csproj">
+      <Project>{2337776d-7d0c-40aa-a439-c26c3ce24fab}</Project>
+      <Name>MIConvexHull</Name>
+    </ProjectReference>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Index: /branches/HeuristicLab.Analysis.AlgorithmBehavior/PerformanceTests/Program.cs
===================================================================
--- /branches/HeuristicLab.Analysis.AlgorithmBehavior/PerformanceTests/Program.cs	(revision 10223)
+++ /branches/HeuristicLab.Analysis.AlgorithmBehavior/PerformanceTests/Program.cs	(revision 10224)
@@ -25,137 +25,111 @@
 using System.Linq;
 using HeuristicLab.Analysis.AlgorithmBehavior.Analyzers;
+using MIConvexHull;
 
 namespace PerformanceTests {
   class Program {
+
+    static int nrOfPoints = 1000;
+    static int dimension = 10;
+
     static void Main(string[] args) {
-      // TestSimpleVolumeCalculation();
-      // TestVolCalc();
-      //TestQHullVolumeCalculation();
-      TestQhull();
+      //TestConvexHullPerformance();
+      //TestVolumeCalculationPerformance();
+
+      TestMDSPerformance();
     }
 
-    public static void TestQhull() {
-      var points = new List<double[]>();
-      points.Add(new double[] { -0.72045174, 1.44667601, -1.75159125 });
-      points.Add(new double[] { -0.67521503, 0.61127293, -0.33962646 });
-      points.Add(new double[] { 2.02392510, -0.41962562, -1.12211942 });
-      points.Add(new double[] { 0.02647963, -0.24983950, -0.47038916 });
-      points.Add(new double[] { 0.61548803, -0.25039511, 0.97745744 });
-      points.Add(new double[] { -1.65142294, -0.09537136, 1.93154268 });
-      points.Add(new double[] { 1.12618422, 0.49384888, 0.05286691 });
-      points.Add(new double[] { -0.12506782, -2.29161965, -0.09710301 });
+    public static void TestMDSPerformance() {
+      double[][] orgPoints = new double[nrOfPoints][];
+      double[][] orgDm = new double[nrOfPoints][];
+      double[][] newPoints = null;
+      Stopwatch watch = new Stopwatch();
 
-      double volume = QhullWrapper.CalculateVolume(points);
-      volume = Math.Round(volume, 6);
-      Console.WriteLine("Volume is: " + volume);
+      AllocArray(orgPoints, dimension);
+      AllocArray(orgDm, nrOfPoints);
+      SamplePoints(orgPoints);
+      CalculateDistanceMatrix(orgDm, orgPoints);
 
-      var result = QhullWrapper.Calculate(points);
+      watch.Start();
+      newPoints = DistanceMatrixToPoints.MetricMDS(orgDm, dimension);
+      watch.Stop();
+      Console.WriteLine("Runtime of MetricMDS (in sec): " + watch.Elapsed.TotalSeconds);
+
+      Console.ReadLine();
     }
 
+    public static void TestConvexHullPerformance() {
+      List<double[]> result = null;
+      Stopwatch watch = new Stopwatch();
 
-    public static void TestVolCalc() {
-      int dim = 3;
-      int size = 8;
-      var data = CreateRandomData(size, dim);
+      var data = CreateRandomData(nrOfPoints, dimension);
       var dataList = data.ToList();
+
+      //calculate convex hull with LP
+      watch.Start();
+      result = LPHull.Calculate(data);
+      watch.Stop();
+      Console.WriteLine("Runtime of LPHull (in sec): " + watch.Elapsed.TotalSeconds);
+
+      //calculate convex hull with SMO
+      watch.Restart();
+      result = HyperHull.Calculate(data);
+      watch.Stop();
+      Console.WriteLine("Runtime of HyperHull (in sec): " + watch.Elapsed.TotalSeconds);
+
+      //calculate convex hull with MIConvexHull
+      watch.Restart();
+      result = ConvexHull.Create(data).Points.Select(x => x.Position).ToList();
+      watch.Stop();
+      Console.WriteLine("Runtime of MIConvexHull (in sec): " + watch.Elapsed.TotalSeconds);
+
+      //calculate convex hull with QHull
+      watch.Restart();
+      result = QhullWrapper.Calculate(dataList);
+      watch.Stop();
+      Console.WriteLine("Runtime of QHull (in sec): " + watch.Elapsed.TotalSeconds);
+
+      Console.ReadLine();
+    }
+
+    public static void TestVolumeCalculationPerformance() {
+      var data = CreateRandomData(nrOfPoints, dimension);
+      var dataList = data.ToList();
+      List<double[]> convexHull = null;
+      double volume = 0.0;
       Stopwatch watch = new Stopwatch();
 
 
-      //calculate convex hull
+      //calculate volume with LP and then use QHull
       watch.Start();
-      var convexHull = LPHull.Calculate(data);
+      convexHull = LPHull.Calculate(data);
+      volume = QhullWrapper.CalculateVolume(convexHull);
       watch.Stop();
-      Console.WriteLine("Convex hull calculation took : " + watch.Elapsed.TotalSeconds + " seconds.");
+      Console.WriteLine(Environment.NewLine + "## Runtime of LPHull/QHull (sec): " + watch.Elapsed.TotalSeconds);
+      //Console.WriteLine("Volume of convex hull is: " + volume);
 
+      //calculate volume with QHull
+      watch.Restart();
+      volume = QhullWrapper.CalculateVolume(dataList);
+      watch.Stop();
+      Console.WriteLine(Environment.NewLine + "## Runtime of QHull (sec): " + watch.Elapsed.TotalSeconds);
+      //Console.WriteLine("Volume of convex hull is: " + volume);
 
-      //calculate volume of convex hull
-      watch.Start();
-      double volume = ConvexHullMeasures.CalculateVolume(convexHull);
-      watch.Stop();
-      Console.WriteLine("Volume calculation of convex hull took : " + watch.Elapsed.TotalSeconds + " seconds.");
-      Console.WriteLine("Volume of convex hull is: " + volume);
-
-
-      //do volume calculation from the whole data set
-      watch.Start();
+      //calculate volume of data with delauny triangulation
+      watch.Restart();
       volume = ConvexHullMeasures.CalculateVolume(dataList);
       watch.Stop();
-      Console.WriteLine("Volume calculation of whole data set took : " + watch.Elapsed.TotalSeconds + " seconds.");
-      Console.WriteLine("Volume of whole data is: " + volume);
-    }
+      Console.WriteLine(Environment.NewLine + "## Runtime using all data with delauny (sec): " + watch.Elapsed.TotalSeconds);
+      //Console.WriteLine("Volume of convex hull is: " + volume);
 
-    private static void TestQHullVolumeCalculation() {
-      const int numPoints = 8;
-      const int dimension = 3;
+      //calculate volume with convex hull (LPHull) and delauny triangulation
+      watch.Restart();
+      convexHull = LPHull.Calculate(data);
+      volume = ConvexHullMeasures.CalculateVolume(convexHull);
+      watch.Stop();
+      Console.WriteLine(Environment.NewLine + "## Runtime using convex hull and delauny (sec): " + watch.Elapsed.TotalSeconds);
+      //Console.WriteLine("Volume of convex hull is: " + volume);
 
-      var points = new List<double[]>();
-
-      points.Add(new double[] { -0.72045174, 1.44667601, -1.75159125 });
-      points.Add(new double[] { -0.67521503, 0.61127293, -0.33962646 });
-      points.Add(new double[] { 2.02392510, -0.41962562, -1.12211942 });
-      points.Add(new double[] { 0.02647963, -0.24983950, -0.47038916 });
-      points.Add(new double[] { 0.61548803, -0.25039511, 0.97745744 });
-      points.Add(new double[] { -1.65142294, -0.09537136, 1.93154268 });
-      points.Add(new double[] { 1.12618422, 0.49384888, 0.05286691 });
-      points.Add(new double[] { -0.12506782, -2.29161965, -0.09710301 });
-
-      Stopwatch watch = new Stopwatch();
-      //calculate convex hull
-      watch.Start();
-      var convexHull = LPHull.Calculate(points.ToArray());
-      watch.Stop();
-      Console.WriteLine("Convex hull calculation took : " + watch.Elapsed.TotalSeconds + " seconds.");
-
-
-      //calculate volume of convex hull
-      watch.Start();
-      double volume = ConvexHullMeasures.CalculateVolume(convexHull);
-      watch.Stop();
-      Console.WriteLine("Volume calculation of convex hull took : " + watch.Elapsed.TotalSeconds + " seconds.");
-      Console.WriteLine("Volume of convex hull is: " + volume);  //7.960698
-
-
-      //do volume calculation from the whole data set
-      watch.Start();
-      volume = ConvexHullMeasures.CalculateVolume(points);
-      watch.Stop();
-      Console.WriteLine("Volume calculation of whole data set took : " + watch.Elapsed.TotalSeconds + " seconds.");
-      Console.WriteLine("Volume of whole data is: " + volume);
-    }
-
-    private static void TestSimpleVolumeCalculation() {
-      const int numPoints = 4;
-      const int dimension = 3;
-
-      double[] num1 = new double[dimension];
-      double[] num2 = new double[dimension];
-      double[] num3 = new double[dimension];
-      double[] num4 = new double[dimension];
-
-      num1[0] = 1;
-      num1[1] = 2;
-      num1[2] = 2;
-
-      num2[0] = 3;
-      num2[1] = 4;
-      num2[2] = 3;
-
-      num3[0] = 3;
-      num3[1] = 6;
-      num3[2] = 3;
-
-      num4[0] = 7;
-      num4[1] = 8;
-      num4[2] = 3;
-
-      var points = new List<double[]>();
-      points.Add(num1);
-      points.Add(num2);
-      points.Add(num3);
-      points.Add(num4);
-
-
-      double volume = ConvexHullMeasures.CalculateSimplexVolume(points);
-
+      Console.ReadLine();
     }
 
@@ -172,4 +146,28 @@
       return result;
     }
+
+    private static void CalculateDistanceMatrix(double[][] dm, double[][] points) {
+      for (int i = 0; i < points.Length; i++) {
+        for (int j = 0; j < points.Length; j++) {
+          dm[i][j] = points[i].EuclideanDistance(points[j]);
+        }
+      }
+    }
+
+    private static void AllocArray(double[][] arr, int size) {
+      for (int i = 0; i < arr.Length; i++) {
+        arr[i] = new double[size];
+      }
+    }
+
+    private static void SamplePoints(double[][] points) {
+      Random rand = new Random();
+
+      for (int i = 0; i < points.Length; i++) {
+        for (int j = 0; j < points[i].Length; j++) {
+          points[i][j] = rand.NextDouble() * 100;
+        }
+      }
+    }
   }
 }
Index: /branches/HeuristicLab.Analysis.AlgorithmBehavior/Visualization/Program.cs
===================================================================
--- /branches/HeuristicLab.Analysis.AlgorithmBehavior/Visualization/Program.cs	(revision 10223)
+++ /branches/HeuristicLab.Analysis.AlgorithmBehavior/Visualization/Program.cs	(revision 10224)
@@ -21,5 +21,4 @@
 
 using System;
-using System.Collections.Generic;
 using System.Diagnostics;
 using System.Linq;
@@ -42,14 +41,11 @@
       double[][] inputs = CreateRandomData(nrOfSamples, sampleSize);
 
-      var convAlgData = ConvertPermutationToVertex(inputs);
-
-
       Stopwatch watch = new Stopwatch();
       watch.Start();
-      var result2 = HyperHull.CalculateUsingSMO(inputs);
+      var result2 = HyperHull.Calculate(inputs);
       watch.Stop();
       Console.WriteLine("HyperHull: " + watch.ElapsedMilliseconds);
       watch.Restart();
-      var result1 = ConvexHull.Create(convAlgData).Points.Select(x => x.Position).ToList();
+      var result1 = ConvexHull.Create(inputs).Points.Select(x => x.Position).ToList();
       watch.Stop();
       Console.WriteLine("MIConvexHull: " + watch.ElapsedMilliseconds);
@@ -81,16 +77,4 @@
     }
 
-    private static List<DefaultVertex> ConvertPermutationToVertex(double[][] data) {
-      List<DefaultVertex> result = new List<DefaultVertex>();
-      for (int i = 0; i < data.Count(); i++) {
-        double[] d = data[i];
-        DefaultVertex vertex = new DefaultVertex();
-        vertex.Position = d;
-        result.Add(vertex);
-
-      }
-      return result;
-    }
-
     private static double[][] CreateRandomData(int n, int m) {
       double[][] result = new double[n][];
Index: /branches/HeuristicLab.Analysis.AlgorithmBehavior/qhull-2012.1/src/HeuristicLab.qhull/HeuristicLab_qhull.c
===================================================================
--- /branches/HeuristicLab.Analysis.AlgorithmBehavior/qhull-2012.1/src/HeuristicLab.qhull/HeuristicLab_qhull.c	(revision 10223)
+++ /branches/HeuristicLab.Analysis.AlgorithmBehavior/qhull-2012.1/src/HeuristicLab.qhull/HeuristicLab_qhull.c	(revision 10224)
@@ -53,6 +53,6 @@
   boolT ismalloc= False;   
   char flags[250];       
-  FILE *outfile= stdout;   
-  FILE *errfile= stdout;   
+  FILE *outfile= NULL;   
+  FILE *errfile= stderr;   
   facetT *facet;           
   int curlong, totlong;    
@@ -71,7 +71,7 @@
   sprintf (flags, "qhull s Tv Qt FA"); 
 
-  exitcode= qh_new_qhull (dim, numpoints, data, ismalloc, flags, outfile, errfile);
+  exitcode = qh_new_qhull (dim, numpoints, data, ismalloc, flags, outfile, errfile);
   if (!exitcode) {                      
-    print_summary();  
+   // print_summary();  
     qh_vertexneighbors();
     volume = qh totvol;
@@ -91,6 +91,6 @@
   boolT ismalloc= False;   
   char flags[250];       
-  FILE *outfile= stdout;   
-  FILE *errfile= stdout;   
+  FILE *outfile= NULL;   
+  FILE *errfile= stderr;   
   facetT *facet;           
   int curlong, totlong;    
@@ -117,5 +117,5 @@
     *nrOfFacets = n;
 
-    print_summary(); 
+    //print_summary(); 
     qh_vertexneighbors();
 
