GTS Library Reference Manual |
---|
#include <gts.h> struct GtsRange; void gts_range_init (GtsRange *r); void gts_range_add_value (GtsRange *r,gdouble val); void gts_range_update (GtsRange *r); void gts_range_reset (GtsRange *r); void gts_range_print (GtsRange *r,FILE *fptr);
Using gts_range_init(), gts_range_add_value() and gts_range_update(), you can easily maintain basic statistics about an ensemble of values.
struct GtsRange { gdouble min, max, sum, sum2, mean, stddev; guint n; };
A simple statistics structure.
min | Minimum value of the population. |
max | Maximum value of the population. |
sum | |
sum2 | |
mean | Average value of the population. |
stddev | Standard deviation of the population. |
n | Number of samples in the population. |
void gts_range_add_value (GtsRange *r,gdouble val);
Adds val to r.
r : | a GtsRange. |
val : | a value to add to r. |
<<< Vectors and matrices | Miscellaneous macros and functions >>> |