# Changeset 671

Ignore:
Timestamp:
Oct 7, 2006, 8:25:22 AM (16 years ago)
Message:

fixed some percentile dox refs #69

File:
1 edited

### Legend:

Unmodified
 r648 double median(const utility::vector& vec, const bool sorted=false); /// /// The percentile is determined by the \a p, a number between 0 and /// 100. The percentile is found by interpolation, using the formula /// \f$percentile = (1 - \delta) x_i + \delta x_{i+1} \f$ where \a /// p is floor\f$((n - 1)p/100)\f$ and \f$\delta \f$ is \f$/// (n-1)p/100 - i \f$.Thus the minimum value of the vector is given /// by p equal to zero, the maximum is given by p equal to 100 and /// the median value is given by p equal to 50. If @a sorted /// is false (default), the vector is copied, the copy is sorted, /// and then used to calculate the median. /// /// @return \a p'th percentile /// /** The percentile is determined by the \a p, a number between 0 and 100. The percentile is found by interpolation, using the formula \f$percentile = (1 - \delta) x_i + \delta x_{i+1} \f$ where \a p is floor\f$((n - 1)p/100)\f$ and \f$\delta \f$ is \f$(n-1)p/100 - i \f$.Thus the minimum value of the vector is given by p equal to zero, the maximum is given by p equal to 100 and the median value is given by p equal to 50. If @a sorted is false (default), the vector is copied, the copy is sorted, and then used to calculate the median. @return \a p'th percentile */ template double percentile(const std::vector& vec, const double p, } /// /// The percentile is determined by the \a p, a number between 0 and /// 100. The percentile is found by interpolation, using the formula /// \f$percentile = (1 - \delta) x_i + \delta x_{i+1} \f$ where \a /// p is floor\f$((n - 1)p/100)\f$ and \f$\delta \f$ is \f$/// (n-1)p/100 - i \f$.Thus the minimum value of the vector is given /// by p equal to zero, the maximum is given by p equal to 100 and /// the median value is given by p equal to 50. If @a sorted /// is false (default), the vector is copied, the copy is sorted, /// and then used to calculate the median. /// /// @return \a p'th percentile /// /** The percentile is determined by the \a p, a number between 0 and 100. The percentile is found by interpolation, using the formula \f$percentile = (1 - \delta) x_i + \delta x_{i+1} \f$ where \a p is floor\f$((n - 1)p/100)\f$ and \f$\delta \f$ is \f$(n-1)p/100 - i \f$.Thus the minimum value of the vector is given by p equal to zero, the maximum is given by p equal to 100 and the median value is given by p equal to 50. If @a sorted is false (default), the vector is copied, the copy is sorted, and then used to calculate the median. @return \a p'th percentile */ double percentile(const utility::vector& vec, const double, const bool sorted=false);