Changeset 10078 for branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers
- Timestamp:
- 10/22/13 00:05:02 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/DistanceMatrixToPoints.cs
r10077 r10078 54 54 if (!res) throw new Exception("Eigenvalue computation did not converge!"); 55 55 56 int zeroCnt = q.Count(x => x.IsAlmost(0) );56 int zeroCnt = q.Count(x => x.IsAlmost(0) || x < 0.0); 57 57 for (int i = 0; i < dm.Length; i++) { 58 58 points[i] = new double[dm.Length - zeroCnt]; … … 61 61 int pi = 0; 62 62 for (int i = 0; i < dm.Length; i++) { 63 if ( q[i].IsAlmost(0)) {63 if (!q[i].IsAlmost(0) && q[i] > 0.0) { 64 64 for (int j = 0; j < dm.Length; j++) { 65 65 points[j][pi] = Math.Sqrt(q[i]) * v[j, i];
Note: See TracChangeset
for help on using the changeset viewer.