pumpkin/rand/distributions/index.html
2016-05-10 15:03:32 -04:00

190 lines
No EOL
10 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="rustdoc">
<meta name="description" content="API documentation for the Rust `distributions` mod in crate `rand`.">
<meta name="keywords" content="rust, rustlang, rust-lang, distributions">
<title>rand::distributions - Rust</title>
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
<link rel="stylesheet" type="text/css" href="../../main.css">
<link rel="shortcut icon" href="https://www.rust-lang.org/favicon.ico">
</head>
<body class="rustdoc">
<!--[if lte IE 8]>
<div class="warning">
This old browser is unsupported and will most likely display funky
things.
</div>
<![endif]-->
<nav class="sidebar">
<a href='../../rand/index.html'><img src='https://www.rust-lang.org/logos/rust-logo-128x128-blk.png' alt='logo' width='100'></a>
<p class='location'><a href='../index.html'>rand</a></p><script>window.sidebarCurrent = {name: 'distributions', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script>
</nav>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content mod">
<h1 class='fqn'><span class='in-band'>Module <a href='../index.html'>rand</a>::<wbr><a class='mod' href=''>distributions</a></span><span class='out-of-band'><span id='render-detail'>
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
[<span class='inner'>&#x2212;</span>]
</a>
</span><a id='src-16' class='srclink' href='../../src/rand/distributions/mod.rs.html#11-404' title='goto source code'>[src]</a></span></h1>
<div class='docblock'><p>Sampling from random distributions.</p>
<p>This is a generalization of <code>Rand</code> to allow parameters to control the
exact properties of the generated values, e.g. the mean and standard
deviation of a normal distribution. The <code>Sample</code> trait is the most
general, and allows for generating values that change some state
internally. The <code>IndependentSample</code> trait is for generating values
that do not need to record state.</p>
</div><h2 id='reexports' class='section-header'><a href="#reexports">Reexports</a></h2>
<table><tr><td><code>pub use self::<a class='mod'
href='./range/index.html'>range</a>::<a class='struct' href='../../rand/distributions/range/struct.Range.html' title='rand::distributions::range::Range'>Range</a>;</code></td></tr><tr><td><code>pub use self::gamma::{<a class='struct' href='../../rand/distributions/gamma/struct.Gamma.html' title='rand::distributions::gamma::Gamma'>Gamma</a>, <a class='struct' href='../../rand/distributions/gamma/struct.ChiSquared.html' title='rand::distributions::gamma::ChiSquared'>ChiSquared</a>, <a class='struct' href='../../rand/distributions/gamma/struct.FisherF.html' title='rand::distributions::gamma::FisherF'>FisherF</a>, <a class='struct' href='../../rand/distributions/gamma/struct.StudentT.html' title='rand::distributions::gamma::StudentT'>StudentT</a>};</code></td></tr><tr><td><code>pub use self::normal::{<a class='struct' href='../../rand/distributions/normal/struct.Normal.html' title='rand::distributions::normal::Normal'>Normal</a>, <a class='struct' href='../../rand/distributions/normal/struct.LogNormal.html' title='rand::distributions::normal::LogNormal'>LogNormal</a>};</code></td></tr><tr><td><code>pub use self::<a class='mod'
href='./exponential/index.html'>exponential</a>::<a class='struct' href='../../rand/distributions/exponential/struct.Exp.html' title='rand::distributions::exponential::Exp'>Exp</a>;</code></td></tr></table><h2 id='modules' class='section-header'><a href="#modules">Modules</a></h2>
<table>
<tr class=' module-item'>
<td><a class='mod' href='exponential/index.html'
title='rand::distributions::exponential'>exponential</a></td>
<td class='docblock short'>
<p>The exponential distribution.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class='mod' href='gamma/index.html'
title='rand::distributions::gamma'>gamma</a></td>
<td class='docblock short'>
<p>The Gamma and derived distributions.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class='mod' href='normal/index.html'
title='rand::distributions::normal'>normal</a></td>
<td class='docblock short'>
<p>The normal and derived distributions.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class='mod' href='range/index.html'
title='rand::distributions::range'>range</a></td>
<td class='docblock short'>
<p>Generating numbers between two others.</p>
</td>
</tr></table><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
<table>
<tr class=' module-item'>
<td><a class='struct' href='struct.RandSample.html'
title='rand::distributions::RandSample'>RandSample</a></td>
<td class='docblock short'>
<p>A wrapper for generating types that implement <code>Rand</code> via the
<code>Sample</code> &amp; <code>IndependentSample</code> traits.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class='struct' href='struct.Weighted.html'
title='rand::distributions::Weighted'>Weighted</a></td>
<td class='docblock short'>
<p>A value with a particular weight for use with <code>WeightedChoice</code>.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class='struct' href='struct.WeightedChoice.html'
title='rand::distributions::WeightedChoice'>WeightedChoice</a></td>
<td class='docblock short'>
<p>A distribution that selects from a finite collection of weighted items.</p>
</td>
</tr></table><h2 id='traits' class='section-header'><a href="#traits">Traits</a></h2>
<table>
<tr class=' module-item'>
<td><a class='trait' href='trait.IndependentSample.html'
title='rand::distributions::IndependentSample'>IndependentSample</a></td>
<td class='docblock short'>
<p><code>Sample</code>s that do not require keeping track of state.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class='trait' href='trait.Sample.html'
title='rand::distributions::Sample'>Sample</a></td>
<td class='docblock short'>
<p>Types that can be used to create a random instance of <code>Support</code>.</p>
</td>
</tr></table></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<aside id="help" class="hidden">
<div>
<h1 class="hidden">Help</h1>
<div class="shortcuts">
<h2>Keyboard Shortcuts</h2>
<dl>
<dt>?</dt>
<dd>Show this help dialog</dd>
<dt>S</dt>
<dd>Focus the search field</dd>
<dt>&larrb;</dt>
<dd>Move up in search results</dd>
<dt>&rarrb;</dt>
<dd>Move down in search results</dd>
<dt>&#9166;</dt>
<dd>Go to active search result</dd>
</dl>
</div>
<div class="infos">
<h2>Search Tricks</h2>
<p>
Prefix searches with a type followed by a colon (e.g.
<code>fn:</code>) to restrict the search to a given type.
</p>
<p>
Accepted types are: <code>fn</code>, <code>mod</code>,
<code>struct</code>, <code>enum</code>,
<code>trait</code>, <code>type</code>, <code>macro</code>,
and <code>const</code>.
</p>
<p>
Search functions by type signature (e.g.
<code>vec -> usize</code> or <code>* -> vec</code>)
</p>
</div>
</div>
</aside>
<script>
window.rootPath = "../../";
window.currentCrate = "rand";
window.playgroundUrl = "";
</script>
<script src="../../jquery.js"></script>
<script src="../../main.js"></script>
<script defer src="../../search-index.js"></script>
</body>
</html>