Source release 17.1.0
This commit is contained in:
@@ -1,16 +1,17 @@
|
||||
// Copyright 2017 Google Inc. All Rights Reserved.
|
||||
// Copyright 2017 Google LLC. All Rights Reserved. This file and proprietary
|
||||
// source code may only be used and distributed under the Widevine License
|
||||
// Agreement.
|
||||
//
|
||||
// This file contains the definition of a Distribution class which computes
|
||||
// the distribution values of a series of samples.
|
||||
|
||||
#ifndef WVCDM_METRICS_DISTRIBUTION_H_
|
||||
#define WVCDM_METRICS_DISTRIBUTION_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <limits>
|
||||
|
||||
namespace wvcdm {
|
||||
namespace metrics {
|
||||
|
||||
// The Distribution class holds statistics about a series of values that the
|
||||
// client provides via the Record method. A caller will call Record once for
|
||||
// each of the values in a series. The Distribution instance will calculate the
|
||||
@@ -24,7 +25,7 @@ namespace metrics {
|
||||
// dist.Count(); // Returns 2.
|
||||
class Distribution {
|
||||
public:
|
||||
Distribution();
|
||||
Distribution() {}
|
||||
|
||||
// Uses the provided sample value to update the computed statistics.
|
||||
void Record(float value);
|
||||
@@ -40,14 +41,12 @@ class Distribution {
|
||||
}
|
||||
|
||||
private:
|
||||
uint64_t count_;
|
||||
float min_;
|
||||
float max_;
|
||||
float mean_;
|
||||
double sum_squared_deviation_;
|
||||
uint64_t count_ = 0;
|
||||
float min_ = std::numeric_limits<float>::max();
|
||||
float max_ = std::numeric_limits<float>::lowest();
|
||||
float mean_ = 0.0f;
|
||||
double sum_squared_deviation_ = 0.0;
|
||||
};
|
||||
|
||||
} // namespace metrics
|
||||
} // namespace wvcdm
|
||||
|
||||
#endif // WVCDM_METRICS_DISTRIBUTION_H_
|
||||
|
||||
Reference in New Issue
Block a user