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

Statistic on the distribution of a sequence of ratios, displayed as %. More...

#include <stats.h>

Inheritance diagram for operations_research::RatioDistribution:
operations_research::DistributionStat operations_research::Stat

Public Member Functions

 RatioDistribution (absl::string_view name)
 
 RatioDistribution ()
 
 RatioDistribution (absl::string_view name, StatsGroup *group)
 
std::string ValueAsString () const override
 Implemented by the subclasses.
 
void Add (double value)
 
- Public Member Functions inherited from operations_research::DistributionStat
 DistributionStat (absl::string_view name)
 
 DistributionStat ()
 
 DistributionStat (absl::string_view name, StatsGroup *group)
 
 ~DistributionStat () override
 
void Reset () override
 Reset this statistic to the same state as if it was newly created.
 
bool WorthPrinting () const override
 Is this stat worth printing? Usually false if nothing was measured.
 
double Sum () const override
 Trivial statistics on all the values added so far.
 
double Max () const
 
double Min () const
 
int64_t Num () const
 
double Average () const
 Get the average of the distribution or 0.0 if empty.
 
double StdDeviation () const
 
- Public Member Functions inherited from operations_research::Stat
 Stat (absl::string_view name)
 
 Stat (absl::string_view name, StatsGroup *group)
 Also add this stat to the given group.
 
virtual ~Stat ()
 
std::string Name () const
 Only used for display purposes.
 
std::string StatString () const
 
virtual int Priority () const
 

Additional Inherited Members

- Protected Member Functions inherited from operations_research::DistributionStat
void AddToDistribution (double value)
 Adds a value to this sequence and updates the stats.
 
- Protected Attributes inherited from operations_research::DistributionStat
double sum_
 
double average_
 
double sum_squares_from_average_
 
double min_
 
double max_
 
int64_t num_
 

Detailed Description

Statistic on the distribution of a sequence of ratios, displayed as %.

Definition at line 265 of file stats.h.

Constructor & Destructor Documentation

◆ RatioDistribution() [1/3]

operations_research::RatioDistribution::RatioDistribution ( absl::string_view name)
inlineexplicit

Definition at line 267 of file stats.h.

◆ RatioDistribution() [2/3]

operations_research::RatioDistribution::RatioDistribution ( )
inline

Definition at line 268 of file stats.h.

◆ RatioDistribution() [3/3]

operations_research::RatioDistribution::RatioDistribution ( absl::string_view name,
StatsGroup * group )
inline

Definition at line 269 of file stats.h.

Member Function Documentation

◆ Add()

void operations_research::RatioDistribution::Add ( double value)

Definition at line 217 of file stats.cc.

◆ ValueAsString()

std::string operations_research::RatioDistribution::ValueAsString ( ) const
overridevirtual

Implemented by the subclasses.

Implements operations_research::DistributionStat.

Definition at line 222 of file stats.cc.


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