mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
7016998: gcutil class LinearLeastSquareFit doesn't initialize some of its fields
Initialize _sum_x_squared, _intercept and _slope in constructor. Reviewed-by: bobv, coleenp
This commit is contained in:
parent
3373070e7f
commit
5b37c4faec
1 changed files with 2 additions and 2 deletions
|
@ -106,8 +106,8 @@ void AdaptivePaddedNoZeroDevAverage::sample(float new_sample) {
|
|||
}
|
||||
|
||||
LinearLeastSquareFit::LinearLeastSquareFit(unsigned weight) :
|
||||
_sum_x(0), _sum_y(0), _sum_xy(0),
|
||||
_mean_x(weight), _mean_y(weight) {}
|
||||
_sum_x(0), _sum_x_squared(0), _sum_y(0), _sum_xy(0),
|
||||
_intercept(0), _slope(0), _mean_x(weight), _mean_y(weight) {}
|
||||
|
||||
void LinearLeastSquareFit::update(double x, double y) {
|
||||
_sum_x = _sum_x + x;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue