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

Manages incremental averages. More...

#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)
 

Detailed Description

Manages incremental averages.

Definition at line 523 of file util.h.

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 526 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 406 of file util.cc.

◆ CurrentAverage()

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

Definition at line 533 of file util.h.

◆ NumRecords()

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

Definition at line 534 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 401 of file util.cc.


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