| 7 | } |
| 8 | |
| 9 | void TMeanCalculator::Add(const double value, const double weight /*= 1.*/) { |
| 10 | SumWeights += weight; |
| 11 | if (SumWeights.Get()) { |
| 12 | Mean += weight * (value - Mean) / SumWeights.Get(); |
| 13 | } |
| 14 | } |
| 15 | |
| 16 | void TMeanCalculator::Remove(const double value, const double weight /*= 1.*/) { |
| 17 | SumWeights -= weight; |
no test coverage detected