Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/12/13 01:06:00 (11 years ago)
Author:
ascheibe
Message:

#1886

  • added more performance tests
  • tried to mute qhull
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Analysis.AlgorithmBehavior/AlgorithmBehaviorUnitTests/LPConvexHullTest.cs

    r10222 r10224  
    2121
    2222using System;
    23 using System.Collections.Generic;
    2423using System.Diagnostics;
    2524using System.Linq;
     
    3635      int sampleSize = 2;
    3736      double[][] inputs = ConvexHullTest.CreateRandomData(nrOfSamples, sampleSize);
    38       var convAlgData = ConvertPermutationToVertex(inputs);
    3937
    4038      Stopwatch watch = new Stopwatch();
     
    4442      Console.WriteLine("LPHull: " + watch.ElapsedMilliseconds);
    4543      watch.Restart();
    46       var result1 = ConvexHull.Create(convAlgData).Points.Select(x => x.Position).ToList();
     44      var result1 = ConvexHull.Create(inputs).Points.Select(x => x.Position).ToList();
    4745      watch.Stop();
    4846      Console.WriteLine("MIConvexHull: " + watch.ElapsedMilliseconds);
     
    140138      return result;
    141139    }
    142 
    143     private List<DefaultVertex> ConvertPermutationToVertex(double[][] data) {
    144       List<DefaultVertex> result = new List<DefaultVertex>();
    145       for (int i = 0; i < data.Count(); i++) {
    146         double[] d = data[i];
    147         DefaultVertex vertex = new DefaultVertex();
    148         vertex.Position = d;
    149         result.Add(vertex);
    150       }
    151       return result;
    152     }
    153140  }
    154141}
Note: See TracChangeset for help on using the changeset viewer.