OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 double f_mid = kScale * exp((n - kMean) * (n - kMean) / kDiv); | 300 double f_mid = kScale * exp((n - kMean) * (n - kMean) / kDiv); |
301 double f_right = kScale * exp((n - kMean + 0.5) * (n - kMean + 0.5) / kDiv); | 301 double f_right = kScale * exp((n - kMean + 0.5) * (n - kMean + 0.5) / kDiv); |
302 double normal_dist = (f_left + 4 * f_mid + f_right) / 6; | 302 double normal_dist = (f_left + 4 * f_mid + f_right) / 6; |
303 // Expect the number of samples to be within 3 standard deviations | 303 // Expect the number of samples to be within 3 standard deviations |
304 // (rounded up) of the expected number of samples in the bucket. | 304 // (rounded up) of the expected number of samples in the bucket. |
305 EXPECT_NEAR(buckets[n], kN * normal_dist, 3 * sqrt(kN * normal_dist) + 1); | 305 EXPECT_NEAR(buckets[n], kN * normal_dist, 3 * sqrt(kN * normal_dist) + 1); |
306 } | 306 } |
307 } | 307 } |
308 | 308 |
309 } // namespace webrtc | 309 } // namespace webrtc |
OLD | NEW |