Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::sat::ExponentialMovingAverage Class Reference

#include <util.h>

Public Member Functions

 ExponentialMovingAverage (double decaying_factor)
 
double CurrentAverage () const
 Returns exponential moving average for all the added data so far.
 
int64_t NumRecords () const
 Returns the total number of added records so far.
 
void AddData (double new_record)
 

Detailed Description

Manages exponential moving averages defined as new_average = decaying_factor * old_average

  • (1 - decaying_factor) * new_record. where 0 < decaying_factor < 1.

Definition at line 547 of file util.h.

Constructor & Destructor Documentation

◆ ExponentialMovingAverage()

operations_research::sat::ExponentialMovingAverage::ExponentialMovingAverage ( double decaying_factor)
inlineexplicit

Definition at line 549 of file util.h.

Member Function Documentation

◆ AddData()

void operations_research::sat::ExponentialMovingAverage::AddData ( double new_record)

Definition at line 411 of file util.cc.

◆ CurrentAverage()

double operations_research::sat::ExponentialMovingAverage::CurrentAverage ( ) const
inline

Returns exponential moving average for all the added data so far.

Definition at line 556 of file util.h.

◆ NumRecords()

int64_t operations_research::sat::ExponentialMovingAverage::NumRecords ( ) const
inline

Returns the total number of added records so far.

Definition at line 559 of file util.h.


The documentation for this class was generated from the following files: