Health-GPS  1.2.2.0
Global Health Policy Simulation model (Health-GPS)
hgps::FirstMoment Struct Reference

Defines the first statistical moment type. More...

#include <riskfactor_adjustment_types.h>

Public Member Functions

bool empty () const noexcept
 Determine whether the moment is empty. More...
 
int count () const noexcept
 Gets the number of values added to the moment. More...
 
double sum () const noexcept
 Gets the values sum. More...
 
double mean () const noexcept
 Gets the values mean. More...
 
void append (double value) noexcept
 Appends a value to the moment. More...
 
void clear () noexcept
 Clear the moment. More...
 
auto operator<=> (const FirstMoment &other) const =default
 Compare FirstMoment instances. More...
 

Detailed Description

Defines the first statistical moment type.

Member Function Documentation

◆ append()

void hgps::FirstMoment::append ( double  value)
inlinenoexcept

Appends a value to the moment.

Parameters
valueThe new value

◆ clear()

void hgps::FirstMoment::clear ( )
inlinenoexcept

Clear the moment.

◆ count()

int hgps::FirstMoment::count ( ) const
inlinenoexcept

Gets the number of values added to the moment.

Returns
Number of values

◆ empty()

bool hgps::FirstMoment::empty ( ) const
inlinenoexcept

Determine whether the moment is empty.

Returns
true if the moment is empty; otherwise, false.

◆ mean()

double hgps::FirstMoment::mean ( ) const
inlinenoexcept

Gets the values mean.

Returns
Mean value

◆ operator<=>()

auto hgps::FirstMoment::operator<=> ( const FirstMoment other) const
default

Compare FirstMoment instances.

Parameters
otherThe other instance to compare
Returns
The comparison result

◆ sum()

double hgps::FirstMoment::sum ( ) const
inlinenoexcept

Gets the values sum.

Returns
Sum value

The documentation for this struct was generated from the following file: