// 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 definitions for the Distribution class members. #include "distribution.h" namespace wvcdm { namespace metrics { void Distribution::Record(float value) { // Using method of provisional means. const float deviation = value - mean_; mean_ += (deviation / ++count_); sum_squared_deviation_ += (deviation * (value - mean_)); min_ = min_ < value ? min_ : value; max_ = max_ > value ? max_ : value; } } // namespace metrics } // namespace wvcdm