- Timestamp:
- 05/14/11 16:45:46 (14 years ago)
- Location:
- branches/histogram
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/histogram
-
branches/histogram/HeuristicLab.Problems.DataAnalysis
- Property svn:mergeinfo changed
/branches/DataAnalysis SolutionEnsembles/HeuristicLab.Problems.DataAnalysis (added) merged: 5816 /trunk/sources/HeuristicLab.Problems.DataAnalysis merged: 6092,6095,6099,6184,6186
- Property svn:mergeinfo changed
-
branches/histogram/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineMeanAndVarianceCalculator.cs
r5945 r6195 73 73 74 74 public void Add(double x) { 75 if (double.IsNaN(x) || double.IsInfinity(x) || (errorState & OnlineCalculatorError.InvalidValueAdded) > 0) {75 if (double.IsNaN(x) || double.IsInfinity(x) || x > 1E13 || x < -1E13 || (errorState & OnlineCalculatorError.InvalidValueAdded) > 0) { 76 76 errorState = errorState | OnlineCalculatorError.InvalidValueAdded; 77 77 varianceErrorState = errorState | OnlineCalculatorError.InvalidValueAdded; … … 84 84 errorState = errorState & (~OnlineCalculatorError.InsufficientElementsAdded); // n >= 1 85 85 } else { 86 86 87 varianceErrorState = varianceErrorState & (~OnlineCalculatorError.InsufficientElementsAdded); // n >= 2 87 88 m_newM = m_oldM + (x - m_oldM) / n;
Note: See TracChangeset
for help on using the changeset viewer.