Changeset 10098 for branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers
- Timestamp:
- 10/31/13 09:34:52 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/DistanceMatrixToPoints.cs
r10097 r10098 136 136 return points; 137 137 } 138 139 public static double[][] TransformToDistances(double[][] similarityMatrix) { 140 double[][] dm = new double[similarityMatrix.Length][]; 141 142 for (int i = 0; i < dm.Length; i++) { 143 dm[i] = new double[similarityMatrix.Length]; 144 for (int j = 0; j < dm.Length; j++) { 145 dm[i][j] = Math.Sqrt(similarityMatrix[i][i] + similarityMatrix[j][j] - 2 * similarityMatrix[i][j]); 146 } 147 } 148 149 return dm; 150 } 138 151 } 139 152 }
Note: See TracChangeset
for help on using the changeset viewer.