19 #include "grass/N_pde.h"
20 #include "grass/glocale.h"
59 for (i = 0; i <
size; i++)
62 val = (val / (double)size);
103 for (i = 0; i <
size; i++)
106 val = (double)pow((
long double)val, (
long double)1.0 / (
long double)
size);
126 val = 2.0 * (a *
b) / (a + b);
148 for (i = 0; i <
size; i++)
157 val = 1.0 / (1.0 / (double)size * val);
176 val = sqrt((a * a + b * b) / 2.0);
198 for (i = 0; i <
size; i++)
201 val = sqrt(val / (
double)size);
double N_calc_harmonic_mean_n(double *a, int size)
Calculate the harmonical mean of the values in vector a of size n.
double N_calc_geom_mean(double a, double b)
Calculate the geometrical mean of values a and b.
double N_calc_geom_mean_n(double *a, int size)
Calculate the geometrical mean of the values in vector a of size n.
double N_calc_quad_mean(double a, double b)
Calculate the quadratic mean of values a and b.
double N_calc_quad_mean_n(double *a, int size)
Calculate the quadratic mean of the values in vector a of size n.
double N_calc_arith_mean(double a, double b)
Calculate the arithmetic mean of values a and b.
double N_calc_harmonic_mean(double a, double b)
Calculate the harmonical mean of values a and b.
double N_calc_arith_mean_n(double *a, int size)
Calculate the arithmetic mean of the values in vector a of size n.