/usr/share/doc/libcoyotl-dev/html/a00015.html is in libcoyotl-dev 3.1.0-5.
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 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 | <!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.7.4 -->
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><b>libcoyotl</b> </li>
<li class="navelem"><a class="el" href="a00015.html">prng</a> </li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pro-attribs">Protected Attributes</a> </div>
<div class="headertitle">
<div class="title">libcoyotl::prng Class Reference</div> </div>
</div>
<div class="contents">
<!-- doxytag: class="libcoyotl::prng" -->
<p>An abstract definition of a peudorandom number generator.
<a href="a00015.html#details">More...</a></p>
<p><code>#include <<a class="el" href="a00029_source.html">prng.h</a>></code></p>
<div class="dynheader">
Inheritance diagram for libcoyotl::prng:</div>
<div class="dyncontent">
<div class="center">
<img src="a00015.png" usemap="#libcoyotl::prng_map" alt=""/>
<map id="libcoyotl::prng_map" name="libcoyotl::prng_map">
<area href="a00004.html" title="Implements CMWC4096, a peudorandom number generator." alt="libcoyotl::cmwc4096" shape="rect" coords="0,56,125,80"/>
<area href="a00007.html" title="Implements KISS, a peudorandom number generator." alt="libcoyotl::kissrng" shape="rect" coords="135,56,260,80"/>
<area href="a00010.html" alt="libcoyotl::mtwister" shape="rect" coords="270,56,395,80"/>
<area href="a00011.html" title="Implements MWC1038, a peudorandom number generator." alt="libcoyotl::mwc1038" shape="rect" coords="405,56,530,80"/>
<area href="a00012.html" title="Implements MWC256, a peudorandom number generator." alt="libcoyotl::mwc256" shape="rect" coords="540,56,665,80"/>
</map>
</div></div>
<p><a href="a00049.html">List of all members.</a></p>
<h2><a name="pub-methods"></a>
Public Member Functions</h2>
<ul>
<li><a class="el" href="a00015.html#a1d1a1883b72b5324fd8dcc17703a444d">prng</a> ()
<dl class="el"><dd class="mdescRight">Default constructor, reading seed from/dev/urandom or the time. <a href="#a1d1a1883b72b5324fd8dcc17703a444d"></a><br/></dl><li><a class="el" href="a00015.html#ae069785fe18c74f7bb921a994d3421ba">prng</a> (uint32_t seed)
<dl class="el"><dd class="mdescRight">Default constructor, with optional seed. <a href="#ae069785fe18c74f7bb921a994d3421ba"></a><br/></dl><li>virtual void <a class="el" href="a00015.html#abd4a242a9b7e372173a01034003a4011">init</a> (uint32_t seed)
<dl class="el"><dd class="mdescRight">Initializes the generator with "seed". <a href="#abd4a242a9b7e372173a01034003a4011"></a><br/></dl><li>uint32_t <a class="el" href="a00015.html#a1fd02ff9bb731cd3b3b34152bad64588">get_seed</a> ()
<dl class="el"><dd class="mdescRight">Returns the original seed value. <a href="#a1fd02ff9bb731cd3b3b34152bad64588"></a><br/></dl><li>virtual uint32_t <a class="el" href="a00015.html#a52c378672859cbf3a60f1d744e526201">get_rand</a> ()=0
<dl class="el"><dd class="mdescRight">Get the next integer. <a href="#a52c378672859cbf3a60f1d744e526201"></a><br/></dl><li>uint32_t <a class="el" href="a00015.html#ab6f1da8479a19f00b4bba9dc0e5edaea">get_rand_range</a> (uint32_t lo, uint32_t hi)
<dl class="el"><dd class="mdescRight">Get the next integer in the range [lo,hi]. <a href="#ab6f1da8479a19f00b4bba9dc0e5edaea"></a><br/></dl><li>size_t <a class="el" href="a00015.html#adabd93b71e6116671bfe44137a75da04">get_rand_index</a> (size_t length)
<dl class="el"><dd class="mdescRight">Get the next random value as a size_t index. <a href="#adabd93b71e6116671bfe44137a75da04"></a><br/></dl><li>double <a class="el" href="a00015.html#acec3bc772e076505c38c0c66076665cf">get_rand_real1</a> ()
<dl class="el"><dd class="mdescRight">Get the next number in the range [0,1]. <a href="#acec3bc772e076505c38c0c66076665cf"></a><br/></dl><li>double <a class="el" href="a00015.html#a1fa4bf05a31903239d4cf083c35c8dae">get_rand_real2</a> ()
<dl class="el"><dd class="mdescRight">Get the next number in the range [0,1) <a href="#a1fa4bf05a31903239d4cf083c35c8dae"></a><br/></dl><li>double <a class="el" href="a00015.html#a03fa0420cd8f742632e708e27b492f44">get_rand_real3</a> ()
<dl class="el"><dd class="mdescRight">Get the next number in the range (0,1) <a href="#a03fa0420cd8f742632e708e27b492f44"></a><br/></dl><li>double <a class="el" href="a00015.html#af80ba5cfd944c92705edf15eef02be3b">get_rand_real53</a> ()
<dl class="el"><dd class="mdescRight">Get the next number in the range [0,1) <a href="#af80ba5cfd944c92705edf15eef02be3b"></a><br/></dl></ul>
<h2><a name="pro-attribs"></a>
Protected Attributes</h2>
<ul>
<li><a class="anchor" id="a826e46bea2a763c276dd9aeacceea4e2"></a><!-- doxytag: member="libcoyotl::prng::m_seed" ref="a826e46bea2a763c276dd9aeacceea4e2" args="" -->
uint32_t <a class="el" href="a00015.html#a826e46bea2a763c276dd9aeacceea4e2">m_seed</a>
<dl class="el"><dd class="mdescRight">Initialization seed. <br/></dl></ul>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>This class defines the generic properties of any psuedo-random number generator that returns a 32-bit unsigned result. </p>
</div><hr/><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" id="a1d1a1883b72b5324fd8dcc17703a444d"></a><!-- doxytag: member="libcoyotl::prng::prng" ref="a1d1a1883b72b5324fd8dcc17703a444d" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">libcoyotl::prng::prng </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="ae069785fe18c74f7bb921a994d3421ba"></a><!-- doxytag: member="libcoyotl::prng::prng" ref="ae069785fe18c74f7bb921a994d3421ba" args="(uint32_t seed)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">libcoyotl::prng::prng </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>Starts the PRNG with a specific seed; this is provided so that a given sequence of "random" values can be duplicated. Note that the actual sequence is predicated on the specific PRNG algorithm. </p>
<dl><dt><b>Parameters:</b></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="a52c378672859cbf3a60f1d744e526201"></a><!-- doxytag: member="libcoyotl::prng::get_rand" ref="a52c378672859cbf3a60f1d744e526201" args="()=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual uint32_t libcoyotl::prng::get_rand </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the next uint32_t in sequence. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>A pseudorandom uint32_t value </dd></dl>
<p>Implemented in <a class="el" href="a00004.html#a42b3f3096a86e8e51827c14a1afdc9bb">libcoyotl::cmwc4096</a>, <a class="el" href="a00007.html#aa96a8a6fe92f2b1b66b131845ddb8445">libcoyotl::kissrng</a>, <a class="el" href="a00010.html#af8c9213cc1199b3c55c128c55a676ce5">libcoyotl::mtwister</a>, <a class="el" href="a00011.html#a92cd5111e9bb16b4c3addea8f73c698d">libcoyotl::mwc1038</a>, and <a class="el" href="a00012.html#a521c6421843ea13e5d6ed09cd7c5140c">libcoyotl::mwc256</a>.</p>
<p>Referenced by <a class="el" href="a00015.html#acec3bc772e076505c38c0c66076665cf">get_rand_real1()</a>, <a class="el" href="a00015.html#a1fa4bf05a31903239d4cf083c35c8dae">get_rand_real2()</a>, and <a class="el" href="a00015.html#a03fa0420cd8f742632e708e27b492f44">get_rand_real3()</a>.</p>
</div>
</div>
<a class="anchor" id="adabd93b71e6116671bfe44137a75da04"></a><!-- doxytag: member="libcoyotl::prng::get_rand_index" ref="adabd93b71e6116671bfe44137a75da04" args="(size_t length)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t libcoyotl::prng::get_rand_index </td>
<td>(</td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>length</em></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the next value as a size_t "index" in the range [0,length). </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">length</td><td>- Maximum value of result </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A pseudorandom size_t value </dd></dl>
<p>References <a class="el" href="a00015.html#a1fa4bf05a31903239d4cf083c35c8dae">get_rand_real2()</a>.</p>
</div>
</div>
<a class="anchor" id="ab6f1da8479a19f00b4bba9dc0e5edaea"></a><!-- doxytag: member="libcoyotl::prng::get_rand_range" ref="ab6f1da8479a19f00b4bba9dc0e5edaea" args="(uint32_t lo, uint32_t hi)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t libcoyotl::prng::get_rand_range </td>
<td>(</td>
<td class="paramtype">uint32_t </td>
<td class="paramname"><em>lo</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t </td>
<td class="paramname"><em>hi</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the next int_value between lo and hi, inclusive. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">lo</td><td>- Minimum value of result </td></tr>
<tr><td class="paramname">hi</td><td>- Maximum value of result </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A pseudorandom uint32_t value </dd></dl>
<p>References <a class="el" href="a00015.html#a1fa4bf05a31903239d4cf083c35c8dae">get_rand_real2()</a>.</p>
</div>
</div>
<a class="anchor" id="acec3bc772e076505c38c0c66076665cf"></a><!-- doxytag: member="libcoyotl::prng::get_rand_real1" ref="acec3bc772e076505c38c0c66076665cf" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">double libcoyotl::prng::get_rand_real1 </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the next real number in the range [0,1], i.e., a number greater than or equal to 0 and less than or equal to 1. Provides 32-bit precision. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>A pseudorandom double value </dd></dl>
<p>References <a class="el" href="a00015.html#a52c378672859cbf3a60f1d744e526201">get_rand()</a>.</p>
</div>
</div>
<a class="anchor" id="a1fa4bf05a31903239d4cf083c35c8dae"></a><!-- doxytag: member="libcoyotl::prng::get_rand_real2" ref="a1fa4bf05a31903239d4cf083c35c8dae" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">double libcoyotl::prng::get_rand_real2 </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the next real number in the range [0,1), i.e., a number greater than or equal to 0 and less than 1. Provides 32-bit precision. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>A pseudorandom double value </dd></dl>
<p>References <a class="el" href="a00015.html#a52c378672859cbf3a60f1d744e526201">get_rand()</a>.</p>
<p>Referenced by <a class="el" href="a00015.html#adabd93b71e6116671bfe44137a75da04">get_rand_index()</a>, and <a class="el" href="a00015.html#ab6f1da8479a19f00b4bba9dc0e5edaea">get_rand_range()</a>.</p>
</div>
</div>
<a class="anchor" id="a03fa0420cd8f742632e708e27b492f44"></a><!-- doxytag: member="libcoyotl::prng::get_rand_real3" ref="a03fa0420cd8f742632e708e27b492f44" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">double libcoyotl::prng::get_rand_real3 </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the next real number in the range (0,1), i.e., a number greater than 0 and less than 1. Provides 32-bit precision. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>A pseudorandom double value </dd></dl>
<p>References <a class="el" href="a00015.html#a52c378672859cbf3a60f1d744e526201">get_rand()</a>.</p>
</div>
</div>
<a class="anchor" id="af80ba5cfd944c92705edf15eef02be3b"></a><!-- doxytag: member="libcoyotl::prng::get_rand_real53" ref="af80ba5cfd944c92705edf15eef02be3b" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">double libcoyotl::prng::get_rand_real53 </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the next real number in the range [0,1), i.e., a number greater than or equal to 0 and less than 1. Provides 53-bit precision. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>A pseudorandom double value </dd></dl>
</div>
</div>
<a class="anchor" id="a1fd02ff9bb731cd3b3b34152bad64588"></a><!-- doxytag: member="libcoyotl::prng::get_seed" ref="a1fd02ff9bb731cd3b3b34152bad64588" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t libcoyotl::prng::get_seed </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the seed value used to initialize this generator. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The seed value used to initialize this generator </dd></dl>
<p>References <a class="el" href="a00015.html#a826e46bea2a763c276dd9aeacceea4e2">m_seed</a>.</p>
</div>
</div>
<a class="anchor" id="abd4a242a9b7e372173a01034003a4011"></a><!-- doxytag: member="libcoyotl::prng::init" ref="abd4a242a9b7e372173a01034003a4011" args="(uint32_t seed)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void libcoyotl::prng::init </td>
<td>(</td>
<td class="paramtype">uint32_t </td>
<td class="paramname"><em>seed</em></td><td>)</td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Resets the generator using the provided seed value. </p>
<dl><dt><b>Parameters:</b></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 in <a class="el" href="a00004.html#af196da55ca3bd914d23d2af927470bd2">libcoyotl::cmwc4096</a>, <a class="el" href="a00007.html#aa5d737b23bd390c9462f7e5a5df39a54">libcoyotl::kissrng</a>, <a class="el" href="a00010.html#a32a0469c8df1552d532ba98a9af3d2d9">libcoyotl::mtwister</a>, <a class="el" href="a00011.html#ab5d5e9534e521000401a105354256edb">libcoyotl::mwc1038</a>, and <a class="el" href="a00012.html#abf8584c30214a9ad3e4ed748ee12eb5f">libcoyotl::mwc256</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="a00029_source.html">prng.h</a></li>
</ul>
</div>
<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>
|