Changeset 5564 for branches/DataAnalysis Refactoring
- Timestamp:
- 02/28/11 09:40:16 (14 years ago)
- Location:
- branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/OnlineEvaluators
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/OnlineEvaluators/OnlineCovarianceEvaluator.cs
r5559 r5564 74 74 OnlineCovarianceEvaluator covarianceEvaluator = new OnlineCovarianceEvaluator(); 75 75 76 while (firstEnumerator.MoveNext() && secondEnumerator.MoveNext()) { 76 // always move forward both enumerators (do not use short-circuit evaluation!) 77 while (firstEnumerator.MoveNext() & secondEnumerator.MoveNext()) { 77 78 double estimated = secondEnumerator.Current; 78 79 double original = firstEnumerator.Current; … … 80 81 } 81 82 83 // check if both enumerators are at the end to make sure both enumerations have the same length 82 84 if (secondEnumerator.MoveNext() || firstEnumerator.MoveNext()) { 83 85 throw new ArgumentException("Number of elements in first and second enumeration doesn't match."); -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/OnlineEvaluators/OnlineMeanAbsolutePercentageErrorEvaluator.cs
r5559 r5564 70 70 OnlineMeanAbsolutePercentageErrorEvaluator evaluator = new OnlineMeanAbsolutePercentageErrorEvaluator(); 71 71 72 // always move forward both enumerators (do not use short-circuit evaluation!) 72 73 while (firstEnumerator.MoveNext() & secondEnumerator.MoveNext()) { 73 74 double estimated = secondEnumerator.Current; … … 76 77 } 77 78 78 if (secondEnumerator.MoveNext() && firstEnumerator.MoveNext()) { 79 // check if both enumerators are at the end to make sure both enumerations have the same length 80 if (secondEnumerator.MoveNext() || firstEnumerator.MoveNext()) { 79 81 throw new ArgumentException("Number of elements in first and second enumeration doesn't match."); 80 82 } else { -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/OnlineEvaluators/OnlineMeanSquaredErrorEvaluator.cs
r5559 r5564 67 67 OnlineMeanSquaredErrorEvaluator mseEvaluator = new OnlineMeanSquaredErrorEvaluator(); 68 68 69 while (firstEnumerator.MoveNext() && secondEnumerator.MoveNext()) { 69 // always move forward both enumerators (do not use short-circuit evaluation!) 70 while (firstEnumerator.MoveNext() & secondEnumerator.MoveNext()) { 70 71 double estimated = secondEnumerator.Current; 71 72 double original = firstEnumerator.Current; … … 73 74 } 74 75 76 // check if both enumerators are at the end to make sure both enumerations have the same length 75 77 if (secondEnumerator.MoveNext() || firstEnumerator.MoveNext()) { 76 78 throw new ArgumentException("Number of elements in first and second enumeration doesn't match."); -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/OnlineEvaluators/OnlineNormalizedMeanSquaredErrorEvaluator.cs
r5559 r5564 67 67 OnlineNormalizedMeanSquaredErrorEvaluator normalizedMSEEvaluator = new OnlineNormalizedMeanSquaredErrorEvaluator(); 68 68 69 while (firstEnumerator.MoveNext() && secondEnumerator.MoveNext()) { 69 // always move forward both enumerators (do not use short-circuit evaluation!) 70 while (firstEnumerator.MoveNext() & secondEnumerator.MoveNext()) { 70 71 double estimated = secondEnumerator.Current; 71 72 double original = firstEnumerator.Current; … … 73 74 } 74 75 76 // check if both enumerators are at the end to make sure both enumerations have the same length 75 77 if (secondEnumerator.MoveNext() || firstEnumerator.MoveNext()) { 76 78 throw new ArgumentException("Number of elements in first and second enumeration doesn't match."); -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/OnlineEvaluators/OnlinePearsonsRSquaredEvaluator.cs
r5559 r5564 75 75 OnlinePearsonsRSquaredEvaluator rSquaredEvaluator = new OnlinePearsonsRSquaredEvaluator(); 76 76 77 while (firstEnumerator.MoveNext() && secondEnumerator.MoveNext()) { 77 // always move forward both enumerators (do not use short-circuit evaluation!) 78 while (firstEnumerator.MoveNext() & secondEnumerator.MoveNext()) { 78 79 double estimated = secondEnumerator.Current; 79 80 double original = firstEnumerator.Current; … … 81 82 } 82 83 84 // check if both enumerators are at the end to make sure both enumerations have the same length 83 85 if (secondEnumerator.MoveNext() || firstEnumerator.MoveNext()) { 84 86 throw new ArgumentException("Number of elements in first and second enumeration doesn't match.");
Note: See TracChangeset
for help on using the changeset viewer.