summary refs log tree commit diff
path: root/src/libextra/stats.rs
AgeCommit message (Collapse)AuthorLines
2014-01-07extratest: Fix all leaked trait importsAlex Crichton-1/+1
2013-12-22std::vec: make the sorting closure use `Ordering` rather than just beingHuon Wilson-3/+22
(implicitly) less_eq.
2013-12-21std::vec: add a sugary .sort() method for plain Ord sorting.Huon Wilson-3/+3
This moves the custom sorting to `.sort_by`.
2013-12-20extra: remove sort in favour of the std method.Huon Wilson-4/+3
Fixes #9676.
2013-12-18auto merge of #10927 : g3xzh/rust/sum_bugfix, r=huonwbors-1/+66
`[1e20, 1.0, -1e20].sum()` returns `0.0`. This happens because during the summation, `1.0` is too small relative to `1e20`, making it negligible. I have tried Kahan summation but it hasn't fixed the problem. Therefore, I've used Python's `fsum()` implementation. For more details, read: www.cs.cmu.edu/~quake-papers/robust-arithmetic.ps https://github.com/mozilla/rust/issues/10851 Python's fsum (msum) http://code.activestate.com/recipes/393090/ @huonw, your feedback is more than welcome. It looks unpolished; Do you have suggestions how to make it more beautiful and elegant? Thanks in advance,
2013-12-19Fix `sum()` accuracyg3xzh-1/+66
`[1e20, 1.0, -1e20].sum()` returns `0.0`. This happens because during the summation, `1.0` is too small relative to `1e20`, making it negligible. I have tried Kahan summation but it hasn't fixed the problem. Therefore, I've used Python's `fsum()` implementation with some help from Jason Fager and Huon Wilson. For more details, read: www.cs.cmu.edu/~quake-papers/robust-arithmetic.ps Moreover, benchmark and unit tests were added. Note: `Status.sum` is still not fully fixed. It doesn't handle NaNs, infinities and overflow correctly. See issue 11059: https://github.com/mozilla/rust/issues/11059
2013-12-13auto merge of #10923 : boredomist/rust/export-summary-members, r=alexcrichtonbors-12/+7
Several of the members of `extra::stats::Summary` were calculated and tested, but not exposed externally. This change exposes all of the members.
2013-12-11Make priv members of extra::stats::Summary public.Erik Price-12/+7
2013-12-11Make 'self lifetime illegal.Erik Price-1/+1
Also remove all instances of 'self within the codebase. This fixes #10889.
2013-11-11Move std::rt::io to std::ioAlex Crichton-4/+4
2013-10-24Remove even more of std::ioAlex Crichton-29/+28
Big fish fried here: extra::json most of the compiler extra::io_util removed extra::fileinput removed Fish left to fry extra::ebml
2013-10-23Removed Unnecessary comments and white spaces #4386reedlepee-1/+0
2013-10-23Making fields in std and extra : private #4386reedlepee-7/+13
2013-10-15Require module documentation with missing_docAlex Crichton-0/+2
Closes #9824
2013-10-07Fix existing privacy/visibility violationsAlex Crichton-1/+2
This commit fixes all of the fallout of the previous commit which is an attempt to refine privacy. There were a few unfortunate leaks which now must be plugged, and the most horrible one is the current `shouldnt_be_public` module now inside `std::rt`. I think that this either needs a slight reorganization of the runtime, or otherwise it needs to just wait for the external users of these modules to get replaced with their `rt` implementations. Other fixes involve making things pub which should be pub, and otherwise updating error messages that now reference privacy instead of referencing an "unresolved name" (yay!).
2013-09-30extra: Remove usage of fmt!Alex Crichton-6/+6
2013-08-27librustc: Fix problem with cross-crate reexported static methods.Patrick Walton-1/+1
2013-08-16doc: correct spelling in documentation.Huon Wilson-1/+1
2013-08-12Fixed #8451 - extra::stats::write_boxplot() applied to negative or zero ↵David Manescu-4/+33
sample values
2013-08-07Forbid `priv` where it has no effectAlex Crichton-1/+1
This is everywhere except struct fields and enum variants.
2013-08-07Add frequency count to extra::stat. #8281Mihnea Dobrescu-Balaur-0/+11
2013-08-03remove obsolete `foreach` keywordDaniel Micay-2/+2
this has been replaced by `for`
2013-08-01migrate many `for` loops to `foreach`Daniel Micay-2/+2
2013-07-17librustc: Remove all uses of "copy".Patrick Walton-1/+1
2013-07-12Remove the global 'vec::to_owned' functionAlex Crichton-4/+3
2013-07-11extra: simplify the bench stat loop, improve stability somewhat (?)Graydon Hoare-1/+4
2013-07-08 Replaces the free-standing functions in f32, &c.Jens Nockert-2/+1
The free-standing functions in f32, f64, i8, i16, i32, i64, u8, u16, u32, u64, float, int, and uint are replaced with generic functions in num instead. If you were previously using any of those functions, just replace them with the corresponding function with the same name in num. Note: If you were using a function that corresponds to an operator, use the operator instead.
2013-06-30extra: docs, tests and new functionality for the extra::stats moduleGraydon Hoare-18/+830
2013-06-29Great renaming: propagate throughout the rest of the codebaseCorey Richardson-5/+4
2013-06-23vec: remove BaseIter implementationDaniel Micay-1/+1
I removed the `static-method-test.rs` test because it was heavily based on `BaseIter` and there are plenty of other more complex uses of static methods anyway.
2013-06-16remove unused importsHuon Wilson-1/+0
2013-06-14add IteratorUtil to the preludeDaniel Micay-1/+1
2013-06-13Revert "std: convert {vec,str}::to_owned to methods."Brian Anderson-1/+2
This fixes the strange random crashes in compile-fail tests. This reverts commit 96cd61ad034cc9e88ab6a7845c3480dbc1ea62f3. Conflicts: src/librustc/driver/driver.rs src/libstd/str.rs src/libsyntax/ext/quote.rs
2013-06-12std: unify the str -> [u8] functions as 3 methods: .as_bytes() and ↵Huon Wilson-1/+0
.as_bytes_with_null[_consume](). The first acts on &str and is not nul-terminated, the last two act on strings that are always null terminated (&'static str, ~str and @str).
2013-06-12std: convert {vec,str}::to_owned to methods.Huon Wilson-1/+1
2013-06-09std: remove fold[lr] in favour of iteratorsHuon Wilson-3/+4
2013-05-30libextra: Require documentation by defaultAlex Crichton-0/+2
2013-05-22libextra: Rename the actual metadata names of libcore to libstd and libstd ↵Patrick Walton-0/+2
to libextra
2013-05-22libstd: Rename libcore to libstd and libstd to libextra; update makefiles.Patrick Walton-0/+96
This only changes the directory names; it does not change the "real" metadata names.