#include <cmath>
Go to the source code of this file.
◆ ADD_SAMPLE
#define ADD_SAMPLE |
( |
|
m, |
|
|
|
s |
|
) |
| |
Value:(m.sum_of_samples += (float)(s), \
m.sum_of_squares += (float)(s) * (float)(s), ++m.num_samples)
Definition at line 54 of file measure.h.
◆ MEAN
#define MEAN |
( |
|
m | ) |
((m).num_samples ? ((float)((m).sum_of_samples / (m).num_samples)) : 0) |
◆ new_measurement
#define new_measurement |
( |
|
m | ) |
((m).num_samples = 0, (m).sum_of_samples = 0, (m).sum_of_squares = 0) |
◆ number_of_samples
#define number_of_samples |
( |
|
m | ) |
((m).num_samples) |
◆ print_summary
#define print_summary |
( |
|
string, |
|
|
|
measure |
|
) |
| |
Value:cprintf(
"\t%-20s \tn = %d, \tm = %4.2f, \ts = %4.2f\n ",
string, \
Definition at line 108 of file measure.h.
◆ standard_deviation
#define standard_deviation |
( |
|
m | ) |
((float) sqrt (VARIANCE (m))) |
◆ VARIANCE
Value:(((m).num_samples > 1) \
? ((float)(((m).num_samples * (m).sum_of_squares - \
(m).sum_of_samples * (m).sum_of_samples) / \
(((m).num_samples - 1) * (m).num_samples))) \
: 0)
Definition at line 96 of file measure.h.