1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
3  <head>
4    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5    <meta http-equiv="Content-Style-Type" content="text/css" />
6    <link rel="stylesheet" href="../../../css/manpage.css" type="text/css" />
7    <style type="text/css"><!--
8      span.static_style
9      {
10        font-size			: 8pt;
11        color				: white;
12        font-weight			: bold;
13        background			: #44f;
14        border-left			: solid 1px #aaf;
15        border-top			: solid 1px #aaf;
16        border-right		: solid 1px #00c;
17        border-bottom		: solid 1px #00c;
18        padding-left		: 2px;
19        padding-right		: 2px;
20      }
21
22      span.virtual_style
23      {
24        font-size			 : 8pt;
25        color				 : white;
26        font-weight			: bold;
27        background			: #0a0;
28        border-left			: solid 1px #0f0;
29        border-top			: solid 1px #0f0;
30        border-right		: solid 1px #060;
31        border-bottom		: solid 1px #060;
32        padding-left		: 2px;
33        padding-right		: 2px;
34      }
35
36      span.protected_style
37      {
38        font-size			 : 8pt;
39        color				 : white;
40        font-weight			: bold;
41        background			: #444;
42        border-left			: solid 1px #ccc;
43        border-top			: solid 1px #ccc;
44        border-right		: solid 1px #222;
45        border-bottom		: solid 1px #222;
46        padding-left		: 2px;
47        padding-right		: 2px;
48      }
49        --></style>
50    <title>nn::math::TinyMt </title>
51  </head>
52  <body>
53    <h1><CODE><a href="../../../nn/Overview.html">nn</a>::<a href="../../../nn/math/Overview.html">math</a>::TinyMt</CODE> Class</h1>
54    <div class="section">
55      <b>Header file: </b> <CODE>nn/math.h</CODE> </div>
56    <h2>Syntax</h2>
57    <div class="section">
58      <pre class="definition">class TinyMt</pre>
59    </div>
60    <h2>Description</h2>
61    <div class="section">
62      <p>A random number generator class using TinyMT.</p><p>Although Tiny Mersenne Twister (TinyMT) suffers in comparison to the Mersenne Twister, it is still a random number generating algorithm that produces good pseudo-random numbers. Compared to the 2.5 KB of internal state required for the Mersenne Twister, the TinyMT only needs an internal state of 16 bytes.</p><p>The parameters for this class (<CODE>mat1</CODE>, <CODE>mat2</CODE>, <CODE>tmat</CODE>) are hard-coded (<CODE>0x8f7011ee</CODE>, <CODE>0xfc78ff1f</CODE>, <CODE>0x3793fdff</CODE>).</p><p>The random number cycle is 2^127 - 1. Normally, the random number series does not cycle.</p><!-- write here --></div>
63    <a name="struct" id="struct">
64      <h2>Structures</h2>
65      <div class="section">
66        <table class="members">
67          <tr>
68            <th>
69              <a href="../../../nn/math/TinyMt/State/Overview.html"><CODE>nn::math::TinyMt::State</CODE> </a>
70            </th>
71            <td>Structure for saving the internal state of random number generation.</td>
72          </tr> </table>
73      </div>
74    </a> <a name="function" id="function">
75      <h2>Member Functions</h2>
76      <div class="section">
77        <table class="members">
78          <tr>
79            <th class="category" colspan="3">Initialization and Finalization</th>
80          </tr>
81          <tr>
82            <td width="100">  </td>
83            <th>
84              <a href="../../../nn/math/TinyMt/Initialize.html"><CODE>Initialize</CODE> </a>
85            </th>
86            <td>Performs initialization.</td>
87          </tr>
88          <tr>
89            <td width="100">  </td>
90            <th>
91              <a href="../../../nn/math/TinyMt/Finalize.html"><CODE>Finalize</CODE> </a>
92            </th>
93            <td>Performs finalization.</td>
94          </tr>
95          <tr>
96            <th class="category" colspan="3">State Saving and Restoration</th>
97          </tr>
98          <tr>
99            <td width="100">  </td>
100            <th>
101              <a href="../../../nn/math/TinyMt/SaveState.html"><CODE>SaveState</CODE> </a>
102            </th>
103            <td>Saves the internal state.</td>
104          </tr>
105          <tr>
106            <td width="100">  </td>
107            <th>
108              <a href="../../../nn/math/TinyMt/RestoreState.html"><CODE>RestoreState</CODE> </a>
109            </th>
110            <td>Restores the internal state.</td>
111          </tr>
112          <tr>
113            <th class="category" colspan="3">Random Number Generation</th>
114          </tr>
115          <tr>
116            <td width="100">  </td>
117            <th>
118              <a href="../../../nn/math/TinyMt/GenerateRandomU32.html"><CODE>GenerateRandomU32</CODE> </a>
119            </th>
120            <td>Generates an unsigned 32-bit random integer.</td>
121          </tr>
122          <tr>
123            <td width="100">  </td>
124            <th>
125              <a href="../../../nn/math/TinyMt/GenerateRandomU64.html"><CODE>GenerateRandomU64</CODE> </a>
126            </th>
127            <td>Generates an unsigned 64-bit random integer.</td>
128          </tr>
129          <tr>
130            <td width="100">  </td>
131            <th>
132              <a href="../../../nn/math/TinyMt/GenerateRandomF32.html"><CODE>GenerateRandomF32</CODE> </a>
133            </th>
134            <td>Generates a single, precision floating-point random number.</td>
135          </tr>
136          <tr>
137            <td width="100">  </td>
138            <th>
139              <a href="../../../nn/math/TinyMt/GenerateRandomF64.html"><CODE>GenerateRandomF64</CODE> </a>
140            </th>
141            <td>Generates a double, precision floating-point random number.</td>
142          </tr>
143          <tr>
144            <td width="100">  </td>
145            <th>
146              <a href="../../../nn/math/TinyMt/GenerateRandomN.html"><CODE>GenerateRandomN</CODE> </a>
147            </th>
148            <td>Generates a random number that is less than the specified number.</td>
149          </tr>
150          <tr>
151            <td width="100">  </td>
152            <th>
153              <a href="../../../nn/math/TinyMt/GenerateRandomBytes.html"><CODE>GenerateRandomBytes</CODE> </a>
154            </th>
155            <td>Generates a series of random bytes.</td>
156          </tr> </table>
157      </div>
158    </a>
159    <h2>Revision History</h2>
160    <div class="section">
161      <dl class="history">
162        <dt>2012/05/11</dt>
163        <dd>Initial version. <br />
164        </dd>
165      </dl>
166    </div>
167  <hr><p>CONFIDENTIAL</p></body>
168</html>