Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/09/13 16:57:27 (11 years ago)
Author:
ascheibe
Message:

#1886 missed a file in last commit (r10208)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/ConvexHullMeasures.cs

    r10207 r10209  
    4444    }
    4545
    46     //calculate center for boundary triangulation (slowwwww.....)
    47     private static double[] CalculateInnerPoint(List<double[]> hyperHull) {
    48       double[] result = new double[hyperHull[0].Count()];
    49 
    50       for (int i = 0; i < hyperHull[0].Count(); i++) {
    51         result[i] = (hyperHull.Max(x => x[i]) + hyperHull.Min(x => x[i])) / 2.0;
    52       }
    53 
    54       return result;
    55     }
    56 
    5746    //calculates the volume of a convex d-polytope
    58     //decomposition based on boundary triangulation
     47    //decomposition based on delaunay triangulation
    5948    public static double CalculateVolume(List<double[]> convexHull) {
    60       double[] innerPoint = CalculateInnerPoint(convexHull);
    61       double volume = 0.0;
    62 
    63       for (int i = 0; i < convexHull.Count - 1; i += 2) {
    64         List<double[]> simplex = new List<double[]>();
    65         simplex.Add(innerPoint);
    66         simplex.Add(convexHull[i]);
    67         simplex.Add(convexHull[i + 1]);
    68         volume += CalculateSimplexVolume(simplex);
    69       }
    70       return volume;
    71     }
    72 
    73     public static double CalculateVolumeNew(List<double[]> convexHull) {
    7449      double volume = 0.0;
    7550
Note: See TracChangeset for help on using the changeset viewer.