about summary refs log tree commit diff
path: root/src/libstd/rand/distributions/mod.rs
AgeCommit message (Collapse)AuthorLines
2014-03-12std: Move rand to librand.Huon Wilson-357/+0
This functionality is not super-core and so doesn't need to be included in std. It's possible that std may need rand (it does a little bit now, for io::test) in which case the functionality required could be moved to a secret hidden module and reexposed by librand. Unfortunately, using #[deprecated] here is hard: there's too much to mock to make it feasible, since we have to ensure that programs still typecheck to reach the linting phase.
2014-03-04Rename all variables that have uppercase characters in their names to use ↵Palmer Cox-6/+6
only lowercase characters
2014-02-28std: Change assert_eq!() to use {} instead of {:?}Alex Crichton-1/+1
Formatting via reflection has been a little questionable for some time now, and it's a little unfortunate that one of the standard macros will silently use reflection when you weren't expecting it. This adds small bits of code bloat to libraries, as well as not always being necessary. In light of this information, this commit switches assert_eq!() to using {} in the error message instead of {:?}. In updating existing code, there were a few error cases that I encountered: * It's impossible to define Show for [T, ..N]. I think DST will alleviate this because we can define Show for [T]. * A few types here and there just needed a #[deriving(Show)] * Type parameters needed a Show bound, I often moved this to `assert!(a == b)` * `Path` doesn't implement `Show`, so assert_eq!() cannot be used on two paths. I don't think this is much of a regression though because {:?} on paths looks awful (it's a byte array). Concretely speaking, this shaved 10K off a 656K binary. Not a lot, but sometime significant for smaller binaries.
2014-01-26Removed all instances of XXX in preparation for relaxing of FIXME ruleSalem Talha-1/+1
2014-01-07stdtest: Fix all leaked trait importsAlex Crichton-1/+1
2014-01-07std: Fill in all missing importsAlex Crichton-1/+4
Fallout from the previous commits
2014-01-04Don't allow newtype structs to be dereferenced. #6246Brian Anderson-2/+3
2013-12-26std::rand: remove the `fn main()` from the examples.Huon Wilson-9/+7
2013-12-23std: Fix all code examplesAlex Crichton-2/+2
2013-12-15std: fix spelling in docs.Huon Wilson-3/+3
2013-12-08std::rand: implement the student t distribution.Huon Wilson-1/+1
2013-12-08std::rand: implement the F distribution.Huon Wilson-1/+1
2013-12-08std::rand: implement the chi-squared distribution.Huon Wilson-1/+1
2013-12-07std::rand: implement the log-normal distribution.Huon Wilson-1/+1
2013-12-07std::rand: move normal and exponential to their own file.Huon Wilson-243/+5
2013-11-26test: Remove non-procedure uses of `do` from compiletest, libstd tests,Patrick Walton-4/+4
compile-fail tests, run-fail tests, and run-pass tests.
2013-11-26librustc: Remove remaining uses of `&fn()` in favor of `||`.Patrick Walton-6/+8
2013-11-22std::rand: move TaskRng off @mut.Huon Wilson-8/+8
Replace with some unsafe code by storing a pointer into TLS-owned heap data.
2013-11-18std::rand: wrappers for floats from [0,1] and (0,1).Huon Wilson-4/+6
Provide `Closed01` and `Open01` that generate directly from the closed/open intervals from 0 to 1, in contrast to the plain impls for f32 and f64 which generate the half-open [0,1). Fixes #7755.
2013-11-01std::rand: share the benchmark counter among the whole module tree.Huon Wilson-7/+5
2013-11-01std::rand: Implement the Gamma distribution.Huon Wilson-0/+2
2013-11-01std::rand: Move distributions to a subfolder.Huon Wilson-0/+589