Function vector_quantile_sorted (o2scl)¶
-
template<class vec_t>
double o2scl::vector_quantile_sorted(size_t n, const vec_t &data, const double f)¶ Quantile from sorted data (ascending only)
This function returns the quantile
f
of data which has already been sorted in ascending order. The quantile, \( q \) , is found by interpolation using\[ q = \left(1-\delta\right) x_i \delta x_{i+1} \]where \( i = \mathrm{floor}[ (n-1)f ] \) and \( \delta = (n-1)f -i \) .This function produces the same results as
gsl_stats_quantile_from_sorted_data()
.No checks are made to ensure the data is sorted, or to ensure that \( 0 \leq 0 \leq 1 \). If
n
is zero, this function will return zero without calling the error handler.
-
template<class vec_t>
double o2scl::vector_quantile_sorted(const vec_t &data, const double f)¶ Quantile from sorted data (ascending only)
This function returns the quantile
f
of data which has already been sorted in ascending order. The quantile, \( q \) , is found by interpolation using\[ q = \left(1-\delta\right) x_i \delta x_{i+1} \]where \( i = \mathrm{floor}[ (n-1)f ] \) and \( \delta = (n-1)f -i \) .This function produces the same results as
gsl_stats_quantile_from_sorted_data()
.No checks are made to ensure the data is sorted, or to ensure that \( 0 \leq 0 \leq 1 \). If
n
is zero, this function will return zero without calling the error handler.