Move SampleStatsCounter to public API

Bug: None
Change-Id: I8956f6febbb1caf71e951d212d57746fe1ec5eb2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/184506
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32142}
This commit is contained in:
Artem Titov
2020-09-18 18:23:08 +02:00
committed by Commit Bot
parent 979c13f565
commit 9d77762023
25 changed files with 126 additions and 56 deletions

View File

@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef RTC_BASE_NUMERICS_RUNNING_STATISTICS_H_
#define RTC_BASE_NUMERICS_RUNNING_STATISTICS_H_
#ifndef API_NUMERICS_RUNNING_STATISTICS_H_
#define API_NUMERICS_RUNNING_STATISTICS_H_
#include <algorithm>
#include <cmath>
@ -20,6 +20,7 @@
#include "rtc_base/numerics/math_utils.h"
namespace webrtc {
namespace webrtc_impl {
// tl;dr: Robust and efficient online computation of statistics,
// using Welford's method for variance. [1]
@ -154,6 +155,7 @@ class RunningStatistics {
double cumul_ = 0; // Variance * size_, sometimes noted m2.
};
} // namespace webrtc_impl
} // namespace webrtc
#endif // RTC_BASE_NUMERICS_RUNNING_STATISTICS_H_
#endif // API_NUMERICS_RUNNING_STATISTICS_H_