DNDSR 0.1.0.dev1+gcd065ad
Distributed Numeric Data Structure for CFV
Loading...
Searching...
No Matches
DNDS::ScalarStatistics Class Reference

Running-statistics accumulator using Welford's online algorithm. More...

#include <Profiling.hpp>

Public Member Functions

void clear ()
 Reset counts and moments to zero.
 
ScalarStatisticsupdate (real v)
 Incorporate a new sample v.
 
std::tuple< real, realget ()
 (mean, stddev) pair for the samples so far.
 
real getSum () const
 Total sum of the samples (reconstructed from the running mean).
 

Detailed Description

Running-statistics accumulator using Welford's online algorithm.

Updates mean and variance in a single pass without storing the sample history. Numerically stable for long sequences. Used to report residual / CFL / iteration-count statistics during solver runs.

Definition at line 98 of file Profiling.hpp.

Member Function Documentation

◆ clear()

void DNDS::ScalarStatistics::clear ( )
inline

Reset counts and moments to zero.

Definition at line 106 of file Profiling.hpp.

◆ get()

std::tuple< real, real > DNDS::ScalarStatistics::get ( )
inline

(mean, stddev) pair for the samples so far.

Definition at line 123 of file Profiling.hpp.

◆ getSum()

real DNDS::ScalarStatistics::getSum ( ) const
inline

Total sum of the samples (reconstructed from the running mean).

Definition at line 129 of file Profiling.hpp.

◆ update()

ScalarStatistics & DNDS::ScalarStatistics::update ( real  v)
inline

Incorporate a new sample v.

Definition at line 113 of file Profiling.hpp.


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