Changeset 10127 for branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers
- Timestamp:
- 11/11/13 22:41:09 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/DistanceMatrixToPoints.cs
r10112 r10127 154 154 } 155 155 156 doublek1 = SumIfLZero(ev);156 int k1 = SumIfLZero(ev); 157 157 if (k1 < k) { 158 158 throw new Exception("Zero-eigenvalues detected. This leads to a degenerate point set. Use constants. "); 159 //TODO: handling of this case; implement adding of constants160 159 } 161 160 … … 227 226 } 228 227 229 private static doubleSumIfLZero(double[] a) {230 return a. Where(x => x > 0.0 && !x.IsAlmost(0.0)).Sum();228 private static int SumIfLZero(double[] a) { 229 return a.Count(x => x > 0.0 && !x.IsAlmost(0.0)); 231 230 } 232 231
Note: See TracChangeset
for help on using the changeset viewer.