Function vector_absdev (o2scl)¶
-
template<class vec_t>
double o2scl::vector_absdev(size_t n, const vec_t &data, double mean)¶ Absolute deviation from the specified mean.
This function computes
\[ \sum_i | x_i - \mu | \]where the value of \( \mu \) is given inmean
.This function produces the same results as
gsl_stats_absdev_m()
.If
n
is zero, this function will return zero without calling the error handler.
-
template<class vec_t>
double o2scl::vector_absdev(const vec_t &data, double mean)¶ Absolute deviation from the specified mean.
This function computes
\[ \sum_i | x_i - \mu | \]where the value of \( \mu \) is given inmean
.This function produces the same results as
gsl_stats_absdev_m()
.If
n
is zero, this function will return zero without calling the error handler.
-
template<class vec_t>
double o2scl::vector_absdev(size_t n, const vec_t &data)¶ Absolute deviation from the computed mean.
This function computes
\[ \sum_i | x_i - \mu | \]where the value of \( \mu \) is mean as computed from vector_mean().This function produces the same results as
gsl_stats_absdev()
.If
n
is zero, this function will return zero without calling the error handler.
-
template<class vec_t>
double o2scl::vector_absdev(const vec_t &data)¶ Absolute deviation from the computed mean.
This function computes
\[ \sum_i | x_i - \mu | \]where the value of \( \mu \) is mean as computed from vector_mean().This function produces the same results as
gsl_stats_absdev()
.If
n
is zero, this function will return zero without calling the error handler.