diff options
| author | Malo Jaffré <jaffre.malo@gmail.com> | 2017-12-31 17:17:01 +0100 |
|---|---|---|
| committer | Malo Jaffré <jaffre.malo@gmail.com> | 2018-01-01 14:44:12 +0100 |
| commit | cbb32a94181d359ca16659b3e74303e945e8ea92 (patch) | |
| tree | 785a92dda4d9ec7b385d05d81db60a8a615cd5a7 /src/libtest | |
| parent | 8395798d1aa33bb6ee74d05825bb775a75a9b70e (diff) | |
| download | rust-cbb32a94181d359ca16659b3e74303e945e8ea92.tar.gz rust-cbb32a94181d359ca16659b3e74303e945e8ea92.zip | |
Fix docs for future pulldown migration
Diffstat (limited to 'src/libtest')
| -rw-r--r-- | src/libtest/stats.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libtest/stats.rs b/src/libtest/stats.rs index f04394f7166..9f8b4a73d0c 100644 --- a/src/libtest/stats.rs +++ b/src/libtest/stats.rs @@ -53,13 +53,13 @@ pub trait Stats { /// Arithmetic mean (average) of the samples: sum divided by sample-count. /// - /// See: https://en.wikipedia.org/wiki/Arithmetic_mean + /// See: <https://en.wikipedia.org/wiki/Arithmetic_mean> fn mean(&self) -> f64; /// Median of the samples: value separating the lower half of the samples from the higher half. /// Equal to `self.percentile(50.0)`. /// - /// See: https://en.wikipedia.org/wiki/Median + /// See: <https://en.wikipedia.org/wiki/Median> fn median(&self) -> f64; /// Variance of the samples: bias-corrected mean of the squares of the differences of each @@ -68,7 +68,7 @@ pub trait Stats { /// bias that would appear if we calculated a population variance, by dividing by `(n-1)` rather /// than `n`. /// - /// See: https://en.wikipedia.org/wiki/Variance + /// See: <https://en.wikipedia.org/wiki/Variance> fn var(&self) -> f64; /// Standard deviation: the square root of the sample variance. @@ -76,7 +76,7 @@ pub trait Stats { /// Note: this is not a robust statistic for non-normal distributions. Prefer the /// `median_abs_dev` for unknown distributions. /// - /// See: https://en.wikipedia.org/wiki/Standard_deviation + /// See: <https://en.wikipedia.org/wiki/Standard_deviation> fn std_dev(&self) -> f64; /// Standard deviation as a percent of the mean value. See `std_dev` and `mean`. @@ -91,7 +91,7 @@ pub trait Stats { /// by the constant `1.4826` to allow its use as a consistent estimator for the standard /// deviation. /// - /// See: http://en.wikipedia.org/wiki/Median_absolute_deviation + /// See: <http://en.wikipedia.org/wiki/Median_absolute_deviation> fn median_abs_dev(&self) -> f64; /// Median absolute deviation as a percent of the median. See `median_abs_dev` and `median`. @@ -103,7 +103,7 @@ pub trait Stats { /// /// Calculated by linear interpolation between closest ranks. /// - /// See: http://en.wikipedia.org/wiki/Percentile + /// See: <http://en.wikipedia.org/wiki/Percentile> fn percentile(&self, pct: f64) -> f64; /// Quartiles of the sample: three values that divide the sample into four equal groups, each @@ -111,13 +111,13 @@ pub trait Stats { /// function may calculate the 3 quartiles more efficiently than 3 calls to `percentile`, but /// is otherwise equivalent. /// - /// See also: https://en.wikipedia.org/wiki/Quartile + /// See also: <https://en.wikipedia.org/wiki/Quartile> fn quartiles(&self) -> (f64, f64, f64); /// Inter-quartile range: the difference between the 25th percentile (1st quartile) and the 75th /// percentile (3rd quartile). See `quartiles`. /// - /// See also: https://en.wikipedia.org/wiki/Interquartile_range + /// See also: <https://en.wikipedia.org/wiki/Interquartile_range> fn iqr(&self) -> f64; } @@ -311,7 +311,7 @@ fn percentile_of_sorted(sorted_samples: &[f64], pct: f64) -> f64 { /// It differs from trimming in that it does not change the number of samples, /// just changes the values of those that are outliers. /// -/// See: http://en.wikipedia.org/wiki/Winsorising +/// See: <http://en.wikipedia.org/wiki/Winsorising> pub fn winsorize(samples: &mut [f64], pct: f64) { let mut tmp = samples.to_vec(); local_sort(&mut tmp); |
