Changeset 5945 for trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineCovarianceCalcualtor.cs
- Timestamp:
- 04/04/11 18:09:49 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineCovarianceCalcualtor.cs
r5943 r5945 82 82 double original = firstEnumerator.Current; 83 83 covarianceCalculator.Add(original, estimated); 84 if (covarianceCalculator.ErrorState != OnlineCalculatorError.None) break; 84 85 } 85 86 86 87 // check if both enumerators are at the end to make sure both enumerations have the same length 87 if (secondEnumerator.MoveNext() || firstEnumerator.MoveNext()) { 88 if (covarianceCalculator.ErrorState == OnlineCalculatorError.None && 89 (secondEnumerator.MoveNext() || firstEnumerator.MoveNext())) { 88 90 throw new ArgumentException("Number of elements in first and second enumeration doesn't match."); 89 91 } else {
Note: See TracChangeset
for help on using the changeset viewer.