/usr/share/doc/libcoyotl-dev/html/a00004.html is in libcoyotl-dev 3.1.0-6.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>libcoyotl</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body bgcolor="#ffffff">
<h1 align="center" color="#606080">
libcoyotl - A Library of C++ Tools
</h1>
<p align="center">
Created by <a href="mailto:scott.ladd@@coyotegulch.com?subject=libcoyotl">Scott Robert Ladd</a> at
<a href="http://www.coyotegulch.com">Coyote Gulch Productions</a>.
</p>
<hr>
<!-- Generated by Doxygen 1.8.1.1 -->
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><b>libcoyotl</b></li><li class="navelem"><a class="el" href="a00004.html">cmwc4096</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> </div>
<div class="headertitle">
<div class="title">libcoyotl::cmwc4096 Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Implements CMWC4096, a peudorandom number generator.
<a href="a00004.html#details">More...</a></p>
<p><code>#include <<a class="el" href="a00019_source.html">cmwc4096.h</a>></code></p>
<div class="dynheader">
Inheritance diagram for libcoyotl::cmwc4096:</div>
<div class="dyncontent">
<div class="center">
<img src="a00004.png" usemap="#libcoyotl::cmwc4096_map" alt=""/>
<map id="libcoyotl::cmwc4096_map" name="libcoyotl::cmwc4096_map">
<area href="a00015.html" title="An abstract definition of a peudorandom number generator." alt="libcoyotl::prng" shape="rect" coords="0,0,125,24"/>
</map>
</div></div>
<p><a href="a00035.html">List of all members.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:abc1f69d1ea500cd2970abf6316da665e"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00004.html#abc1f69d1ea500cd2970abf6316da665e">cmwc4096</a> ()</td></tr>
<tr class="memdesc:abc1f69d1ea500cd2970abf6316da665e"><td class="mdescLeft"> </td><td class="mdescRight">Default constructor, reading seed from/dev/urandom or the time. <a href="#abc1f69d1ea500cd2970abf6316da665e"></a><br/></td></tr>
<tr class="memitem:ae112d62ecfa2b30fb666b23c99842b3d"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00004.html#ae112d62ecfa2b30fb666b23c99842b3d">cmwc4096</a> (uint32_t seed)</td></tr>
<tr class="memdesc:ae112d62ecfa2b30fb666b23c99842b3d"><td class="mdescLeft"> </td><td class="mdescRight">Default constructor, with optional seed. <a href="#ae112d62ecfa2b30fb666b23c99842b3d"></a><br/></td></tr>
<tr class="memitem:af196da55ca3bd914d23d2af927470bd2"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00004.html#af196da55ca3bd914d23d2af927470bd2">init</a> (uint32_t seed)</td></tr>
<tr class="memdesc:af196da55ca3bd914d23d2af927470bd2"><td class="mdescLeft"> </td><td class="mdescRight">Initializes the generator with "seed". <a href="#af196da55ca3bd914d23d2af927470bd2"></a><br/></td></tr>
<tr class="memitem:a42b3f3096a86e8e51827c14a1afdc9bb"><td class="memItemLeft" align="right" valign="top">virtual uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00004.html#a42b3f3096a86e8e51827c14a1afdc9bb">get_rand</a> ()</td></tr>
<tr class="memdesc:a42b3f3096a86e8e51827c14a1afdc9bb"><td class="mdescLeft"> </td><td class="mdescRight">Get the next integer. <a href="#a42b3f3096a86e8e51827c14a1afdc9bb"></a><br/></td></tr>
<tr class="inherit_header pub_methods_a00015"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_a00015')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="a00015.html">libcoyotl::prng</a></td></tr>
<tr class="memitem:a1d1a1883b72b5324fd8dcc17703a444d inherit pub_methods_a00015"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00015.html#a1d1a1883b72b5324fd8dcc17703a444d">prng</a> ()</td></tr>
<tr class="memdesc:a1d1a1883b72b5324fd8dcc17703a444d inherit pub_methods_a00015"><td class="mdescLeft"> </td><td class="mdescRight">Default constructor, reading seed from/dev/urandom or the time. <a href="#a1d1a1883b72b5324fd8dcc17703a444d"></a><br/></td></tr>
<tr class="memitem:ae069785fe18c74f7bb921a994d3421ba inherit pub_methods_a00015"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00015.html#ae069785fe18c74f7bb921a994d3421ba">prng</a> (uint32_t seed)</td></tr>
<tr class="memdesc:ae069785fe18c74f7bb921a994d3421ba inherit pub_methods_a00015"><td class="mdescLeft"> </td><td class="mdescRight">Default constructor, with optional seed. <a href="#ae069785fe18c74f7bb921a994d3421ba"></a><br/></td></tr>
<tr class="memitem:a1fd02ff9bb731cd3b3b34152bad64588 inherit pub_methods_a00015"><td class="memItemLeft" align="right" valign="top">uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00015.html#a1fd02ff9bb731cd3b3b34152bad64588">get_seed</a> ()</td></tr>
<tr class="memdesc:a1fd02ff9bb731cd3b3b34152bad64588 inherit pub_methods_a00015"><td class="mdescLeft"> </td><td class="mdescRight">Returns the original seed value. <a href="#a1fd02ff9bb731cd3b3b34152bad64588"></a><br/></td></tr>
<tr class="memitem:ab6f1da8479a19f00b4bba9dc0e5edaea inherit pub_methods_a00015"><td class="memItemLeft" align="right" valign="top">uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00015.html#ab6f1da8479a19f00b4bba9dc0e5edaea">get_rand_range</a> (uint32_t lo, uint32_t hi)</td></tr>
<tr class="memdesc:ab6f1da8479a19f00b4bba9dc0e5edaea inherit pub_methods_a00015"><td class="mdescLeft"> </td><td class="mdescRight">Get the next integer in the range [lo,hi]. <a href="#ab6f1da8479a19f00b4bba9dc0e5edaea"></a><br/></td></tr>
<tr class="memitem:adabd93b71e6116671bfe44137a75da04 inherit pub_methods_a00015"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00015.html#adabd93b71e6116671bfe44137a75da04">get_rand_index</a> (size_t length)</td></tr>
<tr class="memdesc:adabd93b71e6116671bfe44137a75da04 inherit pub_methods_a00015"><td class="mdescLeft"> </td><td class="mdescRight">Get the next random value as a size_t index. <a href="#adabd93b71e6116671bfe44137a75da04"></a><br/></td></tr>
<tr class="memitem:acec3bc772e076505c38c0c66076665cf inherit pub_methods_a00015"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="a00015.html#acec3bc772e076505c38c0c66076665cf">get_rand_real1</a> ()</td></tr>
<tr class="memdesc:acec3bc772e076505c38c0c66076665cf inherit pub_methods_a00015"><td class="mdescLeft"> </td><td class="mdescRight">Get the next number in the range [0,1]. <a href="#acec3bc772e076505c38c0c66076665cf"></a><br/></td></tr>
<tr class="memitem:a1fa4bf05a31903239d4cf083c35c8dae inherit pub_methods_a00015"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="a00015.html#a1fa4bf05a31903239d4cf083c35c8dae">get_rand_real2</a> ()</td></tr>
<tr class="memdesc:a1fa4bf05a31903239d4cf083c35c8dae inherit pub_methods_a00015"><td class="mdescLeft"> </td><td class="mdescRight">Get the next number in the range [0,1) <a href="#a1fa4bf05a31903239d4cf083c35c8dae"></a><br/></td></tr>
<tr class="memitem:a03fa0420cd8f742632e708e27b492f44 inherit pub_methods_a00015"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="a00015.html#a03fa0420cd8f742632e708e27b492f44">get_rand_real3</a> ()</td></tr>
<tr class="memdesc:a03fa0420cd8f742632e708e27b492f44 inherit pub_methods_a00015"><td class="mdescLeft"> </td><td class="mdescRight">Get the next number in the range (0,1) <a href="#a03fa0420cd8f742632e708e27b492f44"></a><br/></td></tr>
<tr class="memitem:af80ba5cfd944c92705edf15eef02be3b inherit pub_methods_a00015"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="a00015.html#af80ba5cfd944c92705edf15eef02be3b">get_rand_real53</a> ()</td></tr>
<tr class="memdesc:af80ba5cfd944c92705edf15eef02be3b inherit pub_methods_a00015"><td class="mdescLeft"> </td><td class="mdescRight">Get the next number in the range [0,1) <a href="#af80ba5cfd944c92705edf15eef02be3b"></a><br/></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pro_attribs_a00015"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_a00015')"><img src="closed.png" alt="-"/> Protected Attributes inherited from <a class="el" href="a00015.html">libcoyotl::prng</a></td></tr>
<tr class="memitem:a826e46bea2a763c276dd9aeacceea4e2 inherit pro_attribs_a00015"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a826e46bea2a763c276dd9aeacceea4e2"></a>
uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00015.html#a826e46bea2a763c276dd9aeacceea4e2">m_seed</a></td></tr>
<tr class="memdesc:a826e46bea2a763c276dd9aeacceea4e2 inherit pro_attribs_a00015"><td class="mdescLeft"> </td><td class="mdescRight">Initialization seed. <br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>The <a class="el" href="a00004.html" title="Implements CMWC4096, a peudorandom number generator.">cmwc4096</a> class encapsulates a complimentary-multiply-with-carry algorithm for psuedorandom number generation, as suggested by George Marsaglia. </p>
</div><hr/><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" id="abc1f69d1ea500cd2970abf6316da665e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">libcoyotl::cmwc4096::cmwc4096 </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>The constructor initializes the prng seed from either the time or some stochastic source such as /dev/random or /dev/urandom. </p>
</div>
</div>
<a class="anchor" id="ae112d62ecfa2b30fb666b23c99842b3d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">libcoyotl::cmwc4096::cmwc4096 </td>
<td>(</td>
<td class="paramtype">uint32_t </td>
<td class="paramname"><em>seed</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>The constructor uses an explicit value for the seed. </p>
<dl class="params"><dt>Parameters:</dt><dd>
<table class="params">
<tr><td class="paramname">seed</td><td>- Seed value used to "start" or seed the generator </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a42b3f3096a86e8e51827c14a1afdc9bb"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual uint32_t libcoyotl::cmwc4096::get_rand </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the next uint32_t in sequence. </p>
<dl class="section return"><dt>Returns:</dt><dd>A pseudorandom uint32_t value </dd></dl>
<p>Implements <a class="el" href="a00015.html#a52c378672859cbf3a60f1d744e526201">libcoyotl::prng</a>.</p>
</div>
</div>
<a class="anchor" id="af196da55ca3bd914d23d2af927470bd2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void libcoyotl::cmwc4096::init </td>
<td>(</td>
<td class="paramtype">uint32_t </td>
<td class="paramname"><em>seed</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Resets the generator using the provided seed value. </p>
<dl class="params"><dt>Parameters:</dt><dd>
<table class="params">
<tr><td class="paramname">seed</td><td>- Seed value used to "start" or seed the generator </td></tr>
</table>
</dd>
</dl>
<p>Reimplemented from <a class="el" href="a00015.html#abd4a242a9b7e372173a01034003a4011">libcoyotl::prng</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="a00019_source.html">cmwc4096.h</a></li>
</ul>
</div><!-- contents -->
<hr>
<p align="center"><small>
© 1996-2005 Scott Robert Ladd. All rights reserved.<br>
HTML documentation generated by Dimitri van Heesch's excellent <a href="http://www.doxygen.org">Doxygen</a> tool.
</small>
</p>
</body>
</html>
|