Changeset 5530 for branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/OnlineEvaluators
- Timestamp:
- 02/21/11 17:52:58 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/OnlineEvaluators/OnlineMeanAndVarianceCalculator.cs
r5491 r5530 21 21 22 22 using System; 23 using System.Collections.Generic; 23 24 24 25 namespace HeuristicLab.Problems.DataAnalysis { … … 77 78 } 78 79 } 80 81 public static void Calculate(IEnumerable<double> x, out double mean, out double variance) { 82 OnlineMeanAndVarianceCalculator meanAndVarianceCalculator = new OnlineMeanAndVarianceCalculator(); 83 foreach (double xi in x) { 84 meanAndVarianceCalculator.Add(xi); 85 } 86 mean = meanAndVarianceCalculator.Mean; 87 variance = meanAndVarianceCalculator.Variance; 88 } 79 89 } 80 90 }
Note: See TracChangeset
for help on using the changeset viewer.