[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-06 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eExponentialMovingAverage\u003c/code\u003e class manages exponential moving averages using a decaying factor.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to add data, retrieve the current average, and get the total number of records.\u003c/p\u003e\n"],["\u003cp\u003eThe formula for calculating the new average is: \u003ccode\u003enew_average = decaying_factor * old_average + (1 - decaying_factor) * new_record\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe decaying factor should be between 0 and 1 (exclusive).\u003c/p\u003e\n"]]],["The `ExponentialMovingAverage` class in C++ calculates moving averages using a decaying factor. It offers methods to `AddData` (a new record), retrieve the `CurrentAverage`, and query the `NumRecords` (total data points added). The constructor `ExponentialMovingAverage` takes a `decaying_factor` (between 0 and 1) as input. The moving average is updated as `new_average = decaying_factor * old_average + (1 - decaying_factor) * new_record`.\n"],null,["# ExponentialMovingAverage\n\nC++ Reference: class ExponentialMovingAverage\n=============================================\n\n\nNote: This documentation is automatically generated.\nManages exponential moving averages defined as new_average = decaying_factor \\* old_average + (1 - decaying_factor) \\* new_record. where 0 \\\u003c decaying_factor \\\u003c 1.\n\n| Method ||\n|----------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------|\n| [`AddData`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/util.h#L303) | Return type: `void ` Arguments: `double new_record` \u003cbr /\u003e |\n| [`CurrentAverage`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/util.h#L298) | Return type: `double ` Returns exponential moving average for all the added data so far. |\n| [`ExponentialMovingAverage`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/util.h#L291) | Return type: `explicit ` Arguments: `double decaying_factor` \u003cbr /\u003e |\n| [`NumRecords`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/util.h#L301) | Return type: `int64_t ` Returns the total number of added records so far. |"]]