Changeset 10092
 Timestamp:
 10/28/13 18:27:17 (6 years ago)
 Location:
 branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3
 Files:

 1 added
 2 edited
Legend:
 Unmodified
 Added
 Removed

branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/ConvexHullMeasures.cs
r10060 r10092 26 26 public static class ConvexHullMeasures { 27 27 //Calculates the volumne of a dsimplex 28 private static double CalculateSimplexVolume(List<double[]> hyperHull) {29 double[,] diffs = new double[ hyperHull.Count, hyperHull.Count];28 private static double CalculateSimplexVolume(List<double[]> simplex) { 29 double[,] diffs = new double[simplex.Count, simplex.Count]; 30 30 31 for (int i = 0; i < hyperHull.Count; i++) {32 for (int j = 0; j < hyperHull.Count; j++) {33 diffs[i, j] = CalculateVectorDiff(hyperHull[i], hyperHull[j]);31 for (int i = 0; i < simplex.Count; i++) { 32 for (int j = 0; j < simplex.Count; j++) { 33 diffs[i, j] = simplex[i].EuclideanDistance(simplex[j]); 34 34 } 35 35 } 36 36 37 37 double det = alglib.rmatrixdet(diffs); 38 double result = det / hyperHull[0].Count().Fact(); 39 40 return result; 41 } 42 43 private static double CalculateVectorDiff(double[] vector1, double[] vector2) { 44 double result = 0.0; 45 46 for (int i = 0; i < vector1.Length; i++) { 47 result += vector1[i]  vector2[i]; 48 } 38 double result = det / simplex[0].Count().Fact(); 49 39 50 40 return result; 
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers3.3.csproj
r10090 r10092 123 123 </ItemGroup> 124 124 <ItemGroup> 125 <Compile Include="DoubleArrayExtensions.cs" /> 125 126 <Compile Include="RealVectorConvexHullSolutionCacheAnalyzer.cs" /> 126 127 <Compile Include="DistanceMatrixToPoints.cs" />
Note: See TracChangeset
for help on using the changeset viewer.