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

Manages incremental averages. More...

Detailed Description

Manages incremental averages.

Definition at line 604 of file util.h.

#include <util.h>

Public Member Functions

 IncrementalAverage (double initial_average)
 Initializes the average with 'initial_average' and number of records to 0.
 IncrementalAverage ()=default
void Reset (double reset_value)
 Sets the number of records to 0 and average to 'reset_value'.
double CurrentAverage () const
int64_t NumRecords () const
void AddData (double new_record)

Constructor & Destructor Documentation

◆ IncrementalAverage() [1/2]

operations_research::sat::IncrementalAverage::IncrementalAverage ( double initial_average)
inlineexplicit

Initializes the average with 'initial_average' and number of records to 0.

Definition at line 607 of file util.h.

◆ IncrementalAverage() [2/2]

operations_research::sat::IncrementalAverage::IncrementalAverage ( )
default

Member Function Documentation

◆ AddData()

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

Definition at line 450 of file util.cc.

◆ CurrentAverage()

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

Definition at line 614 of file util.h.

◆ NumRecords()

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

Definition at line 615 of file util.h.

◆ Reset()

void operations_research::sat::IncrementalAverage::Reset ( double reset_value)

Sets the number of records to 0 and average to 'reset_value'.

Definition at line 445 of file util.cc.


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