Changeset 511 for trunk/lib/statistics/utility.cc
- Timestamp:
- Feb 18, 2006, 3:46:46 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/statistics/utility.cc
r500 r511 32 32 } 33 33 34 double percentile(const gslapi::vector& vec, const double p, 35 const bool sorted) 36 { 37 if (!sorted){ 38 gslapi::vector vec_c(vec); 39 vec_c.sort(); 40 return gsl_stats_quantile_from_sorted_data(vec_c.gsl_vector_p()->data, 41 vec_c.gsl_vector_p()->stride, 42 vec_c.gsl_vector_p()->size, 43 p); 44 } 45 return gsl_stats_quantile_from_sorted_data (vec.gsl_vector_p()->data, 46 vec.gsl_vector_p()->stride, 47 vec.gsl_vector_p()->size, 48 p); 49 } 50 34 51 }} // of namespace statistics and namespace theplu
Note: See TracChangeset
for help on using the changeset viewer.