source: Daodan/src/dSFMT/html/d_s_f_m_t_8c.html@ 621

Last change on this file since 621 was 440, checked in by rossy, 15 years ago

int32rand

File size: 58.0 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
3<title>dSFMT: dSFMT.c File Reference</title>
4<link href="doxygen.css" rel="stylesheet" type="text/css">
5<link href="tabs.css" rel="stylesheet" type="text/css">
6</head><body>
7<!-- Generated by Doxygen 1.5.5 -->
8<div class="navigation" id="top">
9 <div class="tabs">
10 <ul>
11 <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
12 <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
13 <li class="current"><a href="files.html"><span>Files</span></a></li>
14 </ul>
15 </div>
16</div>
17<div class="contents">
18<h1>dSFMT.c File Reference</h1>double precision SIMD-oriented Fast Mersenne Twister (dSFMT) based on IEEE 754 format. <a href="#_details">More...</a>
19<p>
20<code>#include &lt;stdio.h&gt;</code><br>
21<code>#include &lt;string.h&gt;</code><br>
22<code>#include &lt;stdlib.h&gt;</code><br>
23<code>#include &quot;dSFMT-params.h&quot;</code><br>
24<table border="0" cellpadding="0" cellspacing="0">
25<tr><td></td></tr>
26<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
27<tr><td class="memItemLeft" nowrap align="right" valign="top">static uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="d_s_f_m_t_8c.html#fe0e4e5727d9188f5ae1632da731d412">ini_func1</a> (uint32_t x)</td></tr>
28
29<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function represents a function used in the initialization by init_by_array. <a href="#fe0e4e5727d9188f5ae1632da731d412"></a><br></td></tr>
30<tr><td class="memItemLeft" nowrap align="right" valign="top">static uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="d_s_f_m_t_8c.html#8da6197e2fe073abb9016e3cf4822807">ini_func2</a> (uint32_t x)</td></tr>
31
32<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function represents a function used in the initialization by init_by_array. <a href="#8da6197e2fe073abb9016e3cf4822807"></a><br></td></tr>
33<tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="d_s_f_m_t_8c.html#a56a7244d54e2e8bb162a91ebe098e65">gen_rand_array_c1o2</a> (<a class="el" href="struct_d_s_f_m_t___t.html">dsfmt_t</a> *dsfmt, <a class="el" href="union_w128___t.html">w128_t</a> *array, int size)</td></tr>
34
35<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function fills the user-specified array with double precision floating point pseudorandom numbers of the IEEE 754 format. <a href="#a56a7244d54e2e8bb162a91ebe098e65"></a><br></td></tr>
36<tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="d_s_f_m_t_8c.html#0002bc60cd5c3227bd12f478a32463ba">gen_rand_array_c0o1</a> (<a class="el" href="struct_d_s_f_m_t___t.html">dsfmt_t</a> *dsfmt, <a class="el" href="union_w128___t.html">w128_t</a> *array, int size)</td></tr>
37
38<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function fills the user-specified array with double precision floating point pseudorandom numbers of the IEEE 754 format. <a href="#0002bc60cd5c3227bd12f478a32463ba"></a><br></td></tr>
39<tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="d_s_f_m_t_8c.html#0905d57b8333da366b25773f0b3c5326">gen_rand_array_o0c1</a> (<a class="el" href="struct_d_s_f_m_t___t.html">dsfmt_t</a> *dsfmt, <a class="el" href="union_w128___t.html">w128_t</a> *array, int size)</td></tr>
40
41<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function fills the user-specified array with double precision floating point pseudorandom numbers of the IEEE 754 format. <a href="#0905d57b8333da366b25773f0b3c5326"></a><br></td></tr>
42<tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="d_s_f_m_t_8c.html#2bad2f5ded750e7c250a121cdb61166e">gen_rand_array_o0o1</a> (<a class="el" href="struct_d_s_f_m_t___t.html">dsfmt_t</a> *dsfmt, <a class="el" href="union_w128___t.html">w128_t</a> *array, int size)</td></tr>
43
44<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function fills the user-specified array with double precision floating point pseudorandom numbers of the IEEE 754 format. <a href="#2bad2f5ded750e7c250a121cdb61166e"></a><br></td></tr>
45<tr><td class="memItemLeft" nowrap align="right" valign="top">static int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="d_s_f_m_t_8c.html#6ceeab85133c3fd7ec95aa85523ff544">idxof</a> (int i)</td></tr>
46
47<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function simulate a 32-bit array index overlapped to 64-bit array of LITTLE ENDIAN in BIG ENDIAN machine. <a href="#6ceeab85133c3fd7ec95aa85523ff544"></a><br></td></tr>
48<tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="d_s_f_m_t_8c.html#95a1673e2b7b3a48a7eab8fa19e18e1d">initial_mask</a> (<a class="el" href="struct_d_s_f_m_t___t.html">dsfmt_t</a> *dsfmt)</td></tr>
49
50<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function initializes the internal state array to fit the IEEE 754 format. <a href="#95a1673e2b7b3a48a7eab8fa19e18e1d"></a><br></td></tr>
51<tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="d_s_f_m_t_8c.html#8c0334eb83e12d16f2cfe48929114e44">period_certification</a> (<a class="el" href="struct_d_s_f_m_t___t.html">dsfmt_t</a> *dsfmt)</td></tr>
52
53<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function certificate the period of 2^{SFMT_MEXP}-1. <a href="#8c0334eb83e12d16f2cfe48929114e44"></a><br></td></tr>
54<tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="d_s_f_m_t_8c.html#43e33e2235015c9c072bad7dfe1a282c">do_recursion</a> (<a class="el" href="union_w128___t.html">w128_t</a> *r, <a class="el" href="union_w128___t.html">w128_t</a> *a, <a class="el" href="union_w128___t.html">w128_t</a> *b, <a class="el" href="union_w128___t.html">w128_t</a> *lung)</td></tr>
55
56<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function represents the recursion formula. <a href="#43e33e2235015c9c072bad7dfe1a282c"></a><br></td></tr>
57<tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="d_s_f_m_t_8c.html#3d69e801f1ee2fbdc3b596fab46e179e">convert_c0o1</a> (<a class="el" href="union_w128___t.html">w128_t</a> *w)</td></tr>
58
59<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function converts the double precision floating point numbers which distribute uniformly in the range [1, 2) to those which distribute uniformly in the range [0, 1). <a href="#3d69e801f1ee2fbdc3b596fab46e179e"></a><br></td></tr>
60<tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="d_s_f_m_t_8c.html#6c110f420568ad02e2709f790d3178ef">convert_o0c1</a> (<a class="el" href="union_w128___t.html">w128_t</a> *w)</td></tr>
61
62<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function converts the double precision floating point numbers which distribute uniformly in the range [1, 2) to those which distribute uniformly in the range (0, 1]. <a href="#6c110f420568ad02e2709f790d3178ef"></a><br></td></tr>
63<tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="d_s_f_m_t_8c.html#9fb54ba8ca524bc29724b333b6a37cc2">convert_o0o1</a> (<a class="el" href="union_w128___t.html">w128_t</a> *w)</td></tr>
64
65<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function converts the double precision floating point numbers which distribute uniformly in the range [1, 2) to those which distribute uniformly in the range (0, 1). <a href="#9fb54ba8ca524bc29724b333b6a37cc2"></a><br></td></tr>
66<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="d_s_f_m_t_8c.html#f181eeb77513e5a399dd2c585cfaa055">dsfmt_get_idstring</a> (void)</td></tr>
67
68<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function returns the identification string. <a href="#f181eeb77513e5a399dd2c585cfaa055"></a><br></td></tr>
69<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="d_s_f_m_t_8c.html#f49cc1703b4cc1d0bffbd895917c303a">dsfmt_get_min_array_size</a> (void)</td></tr>
70
71<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function returns the minimum size of array used for <b>fill_array</b> functions. <a href="#f49cc1703b4cc1d0bffbd895917c303a"></a><br></td></tr>
72<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="d_s_f_m_t_8c.html#fccb1e4d75cea7ffe3b45cba53d1e5e0">dsfmt_gen_rand_all</a> (<a class="el" href="struct_d_s_f_m_t___t.html">dsfmt_t</a> *dsfmt)</td></tr>
73
74<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function fills the internal state array with double precision floating point pseudorandom numbers of the IEEE 754 format. <a href="#fccb1e4d75cea7ffe3b45cba53d1e5e0"></a><br></td></tr>
75<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="d_s_f_m_t_8c.html#beef257039f3b95b7475bbecdb521b89">dsfmt_fill_array_close1_open2</a> (<a class="el" href="struct_d_s_f_m_t___t.html">dsfmt_t</a> *dsfmt, double array[], int size)</td></tr>
76
77<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function generates double precision floating point pseudorandom numbers which distribute in the range [1, 2) to the specified array[] by one call. <a href="#beef257039f3b95b7475bbecdb521b89"></a><br></td></tr>
78<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="d_s_f_m_t_8c.html#6ad6f12b9a47ea89ceab693b1eec5079">dsfmt_fill_array_open_close</a> (<a class="el" href="struct_d_s_f_m_t___t.html">dsfmt_t</a> *dsfmt, double array[], int size)</td></tr>
79
80<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function generates double precision floating point pseudorandom numbers which distribute in the range (0, 1] to the specified array[] by one call. <a href="#6ad6f12b9a47ea89ceab693b1eec5079"></a><br></td></tr>
81<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="d_s_f_m_t_8c.html#243fb9ed1b61233f3dba4ab15c541eb0">dsfmt_fill_array_close_open</a> (<a class="el" href="struct_d_s_f_m_t___t.html">dsfmt_t</a> *dsfmt, double array[], int size)</td></tr>
82
83<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function generates double precision floating point pseudorandom numbers which distribute in the range [0, 1) to the specified array[] by one call. <a href="#243fb9ed1b61233f3dba4ab15c541eb0"></a><br></td></tr>
84<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="d_s_f_m_t_8c.html#eed310e17f9f652c1b0ec86298c834c1">dsfmt_fill_array_open_open</a> (<a class="el" href="struct_d_s_f_m_t___t.html">dsfmt_t</a> *dsfmt, double array[], int size)</td></tr>
85
86<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function generates double precision floating point pseudorandom numbers which distribute in the range (0, 1) to the specified array[] by one call. <a href="#eed310e17f9f652c1b0ec86298c834c1"></a><br></td></tr>
87<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="d_s_f_m_t_8c.html#2fa6a84095a280a4e1556415f3d4f259">dsfmt_chk_init_gen_rand</a> (<a class="el" href="struct_d_s_f_m_t___t.html">dsfmt_t</a> *dsfmt, uint32_t seed, int mexp)</td></tr>
88
89<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function initializes the internal state array with a 32-bit integer seed. <a href="#2fa6a84095a280a4e1556415f3d4f259"></a><br></td></tr>
90<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="d_s_f_m_t_8c.html#91cef405a85910d4e56b4a1d10fb89f1">dsfmt_chk_init_by_array</a> (<a class="el" href="struct_d_s_f_m_t___t.html">dsfmt_t</a> *dsfmt, uint32_t init_key[], int key_length, int mexp)</td></tr>
91
92<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function initializes the internal state array, with an array of 32-bit integers used as the seeds. <a href="#91cef405a85910d4e56b4a1d10fb89f1"></a><br></td></tr>
93<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
94<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="struct_d_s_f_m_t___t.html">dsfmt_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="d_s_f_m_t_8c.html#dfee3c4c3505ddcfc334251f94968737">dsfmt_global_data</a></td></tr>
95
96<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">dsfmt internal state vector <a href="#dfee3c4c3505ddcfc334251f94968737"></a><br></td></tr>
97<tr><td class="memItemLeft" nowrap align="right" valign="top">static const int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="d_s_f_m_t_8c.html#3720bab32cfc7fed812b49d96cde8636">dsfmt_mexp</a> = DSFMT_MEXP</td></tr>
98
99<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">dsfmt mexp for check <a href="#3720bab32cfc7fed812b49d96cde8636"></a><br></td></tr>
100</table>
101<hr><a name="_details"></a><h2>Detailed Description</h2>
102double precision SIMD-oriented Fast Mersenne Twister (dSFMT) based on IEEE 754 format.
103<p>
104<dl class="author" compact><dt><b>Author:</b></dt><dd>Mutsuo Saito (Hiroshima University) <p>
105Makoto Matsumoto (Hiroshima University)</dd></dl>
106Copyright (C) 2007,2008 Mutsuo Saito, Makoto Matsumoto and Hiroshima University. All rights reserved.<p>
107The new BSD License is applied to this software, see LICENSE.txt <hr><h2>Function Documentation</h2>
108<a class="anchor" name="3d69e801f1ee2fbdc3b596fab46e179e"></a><!-- doxytag: member="dSFMT.c::convert_c0o1" ref="3d69e801f1ee2fbdc3b596fab46e179e" args="(w128_t *w)" -->
109<div class="memitem">
110<div class="memproto">
111 <table class="memname">
112 <tr>
113 <td class="memname">static void convert_c0o1 </td>
114 <td>(</td>
115 <td class="paramtype"><a class="el" href="union_w128___t.html">w128_t</a> *&nbsp;</td>
116 <td class="paramname"> <em>w</em> </td>
117 <td>&nbsp;)&nbsp;</td>
118 <td width="100%"><code> [inline, static]</code></td>
119 </tr>
120 </table>
121</div>
122<div class="memdoc">
123
124<p>
125This function converts the double precision floating point numbers which distribute uniformly in the range [1, 2) to those which distribute uniformly in the range [0, 1).
126<p>
127<dl compact><dt><b>Parameters:</b></dt><dd>
128 <table border="0" cellspacing="2" cellpadding="0">
129 <tr><td valign="top"></td><td valign="top"><em>w</em>&nbsp;</td><td>128bit stracture of double precision floating point numbers (I/O) </td></tr>
130 </table>
131</dl>
132
133<p>References <a class="el" href="d_s_f_m_t_8h-source.html#l00154">W128_T::d</a>.</p>
134
135<p>Referenced by <a class="el" href="d_s_f_m_t_8c-source.html#l00281">gen_rand_array_c0o1()</a>.</p>
136
137</div>
138</div><p>
139<a class="anchor" name="6c110f420568ad02e2709f790d3178ef"></a><!-- doxytag: member="dSFMT.c::convert_o0c1" ref="6c110f420568ad02e2709f790d3178ef" args="(w128_t *w)" -->
140<div class="memitem">
141<div class="memproto">
142 <table class="memname">
143 <tr>
144 <td class="memname">static void convert_o0c1 </td>
145 <td>(</td>
146 <td class="paramtype"><a class="el" href="union_w128___t.html">w128_t</a> *&nbsp;</td>
147 <td class="paramname"> <em>w</em> </td>
148 <td>&nbsp;)&nbsp;</td>
149 <td width="100%"><code> [inline, static]</code></td>
150 </tr>
151 </table>
152</div>
153<div class="memdoc">
154
155<p>
156This function converts the double precision floating point numbers which distribute uniformly in the range [1, 2) to those which distribute uniformly in the range (0, 1].
157<p>
158<dl compact><dt><b>Parameters:</b></dt><dd>
159 <table border="0" cellspacing="2" cellpadding="0">
160 <tr><td valign="top"></td><td valign="top"><em>w</em>&nbsp;</td><td>128bit stracture of double precision floating point numbers (I/O) </td></tr>
161 </table>
162</dl>
163
164<p>References <a class="el" href="d_s_f_m_t_8h-source.html#l00154">W128_T::d</a>.</p>
165
166<p>Referenced by <a class="el" href="d_s_f_m_t_8c-source.html#l00367">gen_rand_array_o0c1()</a>.</p>
167
168</div>
169</div><p>
170<a class="anchor" name="9fb54ba8ca524bc29724b333b6a37cc2"></a><!-- doxytag: member="dSFMT.c::convert_o0o1" ref="9fb54ba8ca524bc29724b333b6a37cc2" args="(w128_t *w)" -->
171<div class="memitem">
172<div class="memproto">
173 <table class="memname">
174 <tr>
175 <td class="memname">static void convert_o0o1 </td>
176 <td>(</td>
177 <td class="paramtype"><a class="el" href="union_w128___t.html">w128_t</a> *&nbsp;</td>
178 <td class="paramname"> <em>w</em> </td>
179 <td>&nbsp;)&nbsp;</td>
180 <td width="100%"><code> [inline, static]</code></td>
181 </tr>
182 </table>
183</div>
184<div class="memdoc">
185
186<p>
187This function converts the double precision floating point numbers which distribute uniformly in the range [1, 2) to those which distribute uniformly in the range (0, 1).
188<p>
189<dl compact><dt><b>Parameters:</b></dt><dd>
190 <table border="0" cellspacing="2" cellpadding="0">
191 <tr><td valign="top"></td><td valign="top"><em>w</em>&nbsp;</td><td>128bit stracture of double precision floating point numbers (I/O) </td></tr>
192 </table>
193</dl>
194
195<p>References <a class="el" href="d_s_f_m_t_8h-source.html#l00154">W128_T::d</a>, and <a class="el" href="d_s_f_m_t_8h-source.html#l00152">W128_T::u</a>.</p>
196
197<p>Referenced by <a class="el" href="d_s_f_m_t_8c-source.html#l00324">gen_rand_array_o0o1()</a>.</p>
198
199</div>
200</div><p>
201<a class="anchor" name="43e33e2235015c9c072bad7dfe1a282c"></a><!-- doxytag: member="dSFMT.c::do_recursion" ref="43e33e2235015c9c072bad7dfe1a282c" args="(w128_t *r, w128_t *a, w128_t *b, w128_t *lung)" -->
202<div class="memitem">
203<div class="memproto">
204 <table class="memname">
205 <tr>
206 <td class="memname">static void do_recursion </td>
207 <td>(</td>
208 <td class="paramtype"><a class="el" href="union_w128___t.html">w128_t</a> *&nbsp;</td>
209 <td class="paramname"> <em>r</em>, </td>
210 </tr>
211 <tr>
212 <td class="paramkey"></td>
213 <td></td>
214 <td class="paramtype"><a class="el" href="union_w128___t.html">w128_t</a> *&nbsp;</td>
215 <td class="paramname"> <em>a</em>, </td>
216 </tr>
217 <tr>
218 <td class="paramkey"></td>
219 <td></td>
220 <td class="paramtype"><a class="el" href="union_w128___t.html">w128_t</a> *&nbsp;</td>
221 <td class="paramname"> <em>b</em>, </td>
222 </tr>
223 <tr>
224 <td class="paramkey"></td>
225 <td></td>
226 <td class="paramtype"><a class="el" href="union_w128___t.html">w128_t</a> *&nbsp;</td>
227 <td class="paramname"> <em>lung</em></td><td>&nbsp;</td>
228 </tr>
229 <tr>
230 <td></td>
231 <td>)</td>
232 <td></td><td></td><td width="100%"><code> [inline, static]</code></td>
233 </tr>
234 </table>
235</div>
236<div class="memdoc">
237
238<p>
239This function represents the recursion formula.
240<p>
241<dl compact><dt><b>Parameters:</b></dt><dd>
242 <table border="0" cellspacing="2" cellpadding="0">
243 <tr><td valign="top"></td><td valign="top"><em>r</em>&nbsp;</td><td>output </td></tr>
244 <tr><td valign="top"></td><td valign="top"><em>a</em>&nbsp;</td><td>a 128-bit part of the internal state array </td></tr>
245 <tr><td valign="top"></td><td valign="top"><em>b</em>&nbsp;</td><td>a 128-bit part of the internal state array </td></tr>
246 <tr><td valign="top"></td><td valign="top"><em>lung</em>&nbsp;</td><td>a 128-bit part of the internal state array This function represents the recursion formula. </td></tr>
247 <tr><td valign="top"></td><td valign="top"><em>r</em>&nbsp;</td><td>output 128-bit </td></tr>
248 <tr><td valign="top"></td><td valign="top"><em>a</em>&nbsp;</td><td>a 128-bit part of the internal state array </td></tr>
249 <tr><td valign="top"></td><td valign="top"><em>b</em>&nbsp;</td><td>a 128-bit part of the internal state array </td></tr>
250 <tr><td valign="top"></td><td valign="top"><em>lung</em>&nbsp;</td><td>a 128-bit part of the internal state array (I/O) </td></tr>
251 </table>
252</dl>
253
254<p>References <a class="el" href="d_s_f_m_t_8h-source.html#l00152">W128_T::u</a>.</p>
255
256<p>Referenced by <a class="el" href="d_s_f_m_t_8c-source.html#l00509">dsfmt_gen_rand_all()</a>, <a class="el" href="d_s_f_m_t_8c-source.html#l00281">gen_rand_array_c0o1()</a>, <a class="el" href="d_s_f_m_t_8c-source.html#l00243">gen_rand_array_c1o2()</a>, <a class="el" href="d_s_f_m_t_8c-source.html#l00367">gen_rand_array_o0c1()</a>, and <a class="el" href="d_s_f_m_t_8c-source.html#l00324">gen_rand_array_o0o1()</a>.</p>
257
258</div>
259</div><p>
260<a class="anchor" name="91cef405a85910d4e56b4a1d10fb89f1"></a><!-- doxytag: member="dSFMT.c::dsfmt_chk_init_by_array" ref="91cef405a85910d4e56b4a1d10fb89f1" args="(dsfmt_t *dsfmt, uint32_t init_key[], int key_length, int mexp)" -->
261<div class="memitem">
262<div class="memproto">
263 <table class="memname">
264 <tr>
265 <td class="memname">void dsfmt_chk_init_by_array </td>
266 <td>(</td>
267 <td class="paramtype"><a class="el" href="struct_d_s_f_m_t___t.html">dsfmt_t</a> *&nbsp;</td>
268 <td class="paramname"> <em>dsfmt</em>, </td>
269 </tr>
270 <tr>
271 <td class="paramkey"></td>
272 <td></td>
273 <td class="paramtype">uint32_t&nbsp;</td>
274 <td class="paramname"> <em>init_key</em>[], </td>
275 </tr>
276 <tr>
277 <td class="paramkey"></td>
278 <td></td>
279 <td class="paramtype">int&nbsp;</td>
280 <td class="paramname"> <em>key_length</em>, </td>
281 </tr>
282 <tr>
283 <td class="paramkey"></td>
284 <td></td>
285 <td class="paramtype">int&nbsp;</td>
286 <td class="paramname"> <em>mexp</em></td><td>&nbsp;</td>
287 </tr>
288 <tr>
289 <td></td>
290 <td>)</td>
291 <td></td><td></td><td width="100%"></td>
292 </tr>
293 </table>
294</div>
295<div class="memdoc">
296
297<p>
298This function initializes the internal state array, with an array of 32-bit integers used as the seeds.
299<p>
300<dl compact><dt><b>Parameters:</b></dt><dd>
301 <table border="0" cellspacing="2" cellpadding="0">
302 <tr><td valign="top"></td><td valign="top"><em>dsfmt</em>&nbsp;</td><td>dsfmt state vector. </td></tr>
303 <tr><td valign="top"></td><td valign="top"><em>init_key</em>&nbsp;</td><td>the array of 32-bit integers, used as a seed. </td></tr>
304 <tr><td valign="top"></td><td valign="top"><em>key_length</em>&nbsp;</td><td>the length of init_key. </td></tr>
305 <tr><td valign="top"></td><td valign="top"><em>mexp</em>&nbsp;</td><td>caller's mersenne expornent </td></tr>
306 </table>
307</dl>
308
309<p>References <a class="el" href="d_s_f_m_t_8c-source.html#l00022">dsfmt_mexp</a>, <a class="el" href="d_s_f_m_t_8h-source.html#l00051">DSFMT_N</a>, <a class="el" href="d_s_f_m_t_8h-source.html#l00057">DSFMT_N64</a>, <a class="el" href="d_s_f_m_t_8h-source.html#l00164">DSFMT_T::idx</a>, <a class="el" href="d_s_f_m_t_8c-source.html#l00064">idxof()</a>, <a class="el" href="d_s_f_m_t_8c-source.html#l00409">ini_func1()</a>, <a class="el" href="d_s_f_m_t_8c-source.html#l00419">ini_func2()</a>, <a class="el" href="d_s_f_m_t_8c-source.html#l00428">initial_mask()</a>, <a class="el" href="d_s_f_m_t_8c-source.html#l00442">period_certification()</a>, <a class="el" href="d_s_f_m_t_8h-source.html#l00163">DSFMT_T::status</a>, and <a class="el" href="d_s_f_m_t_8h-source.html#l00153">W128_T::u32</a>.</p>
310
311<p>Referenced by <a class="el" href="d_s_f_m_t_8h-source.html#l00458">dsfmt_init_by_array()</a>.</p>
312
313</div>
314</div><p>
315<a class="anchor" name="2fa6a84095a280a4e1556415f3d4f259"></a><!-- doxytag: member="dSFMT.c::dsfmt_chk_init_gen_rand" ref="2fa6a84095a280a4e1556415f3d4f259" args="(dsfmt_t *dsfmt, uint32_t seed, int mexp)" -->
316<div class="memitem">
317<div class="memproto">
318 <table class="memname">
319 <tr>
320 <td class="memname">void dsfmt_chk_init_gen_rand </td>
321 <td>(</td>
322 <td class="paramtype"><a class="el" href="struct_d_s_f_m_t___t.html">dsfmt_t</a> *&nbsp;</td>
323 <td class="paramname"> <em>dsfmt</em>, </td>
324 </tr>
325 <tr>
326 <td class="paramkey"></td>
327 <td></td>
328 <td class="paramtype">uint32_t&nbsp;</td>
329 <td class="paramname"> <em>seed</em>, </td>
330 </tr>
331 <tr>
332 <td class="paramkey"></td>
333 <td></td>
334 <td class="paramtype">int&nbsp;</td>
335 <td class="paramname"> <em>mexp</em></td><td>&nbsp;</td>
336 </tr>
337 <tr>
338 <td></td>
339 <td>)</td>
340 <td></td><td></td><td width="100%"></td>
341 </tr>
342 </table>
343</div>
344<div class="memdoc">
345
346<p>
347This function initializes the internal state array with a 32-bit integer seed.
348<p>
349<dl compact><dt><b>Parameters:</b></dt><dd>
350 <table border="0" cellspacing="2" cellpadding="0">
351 <tr><td valign="top"></td><td valign="top"><em>dsfmt</em>&nbsp;</td><td>dsfmt state vector. </td></tr>
352 <tr><td valign="top"></td><td valign="top"><em>seed</em>&nbsp;</td><td>a 32-bit integer used as the seed. </td></tr>
353 <tr><td valign="top"></td><td valign="top"><em>mexp</em>&nbsp;</td><td>caller's mersenne expornent </td></tr>
354 </table>
355</dl>
356
357<p>References <a class="el" href="d_s_f_m_t_8c-source.html#l00022">dsfmt_mexp</a>, <a class="el" href="d_s_f_m_t_8h-source.html#l00051">DSFMT_N</a>, <a class="el" href="d_s_f_m_t_8h-source.html#l00057">DSFMT_N64</a>, <a class="el" href="d_s_f_m_t_8h-source.html#l00164">DSFMT_T::idx</a>, <a class="el" href="d_s_f_m_t_8c-source.html#l00064">idxof()</a>, <a class="el" href="d_s_f_m_t_8c-source.html#l00428">initial_mask()</a>, <a class="el" href="d_s_f_m_t_8c-source.html#l00442">period_certification()</a>, <a class="el" href="d_s_f_m_t_8h-source.html#l00163">DSFMT_T::status</a>, and <a class="el" href="d_s_f_m_t_8h-source.html#l00153">W128_T::u32</a>.</p>
358
359<p>Referenced by <a class="el" href="d_s_f_m_t_8h-source.html#l00437">dsfmt_init_gen_rand()</a>.</p>
360
361</div>
362</div><p>
363<a class="anchor" name="beef257039f3b95b7475bbecdb521b89"></a><!-- doxytag: member="dSFMT.c::dsfmt_fill_array_close1_open2" ref="beef257039f3b95b7475bbecdb521b89" args="(dsfmt_t *dsfmt, double array[], int size)" -->
364<div class="memitem">
365<div class="memproto">
366 <table class="memname">
367 <tr>
368 <td class="memname">void dsfmt_fill_array_close1_open2 </td>
369 <td>(</td>
370 <td class="paramtype"><a class="el" href="struct_d_s_f_m_t___t.html">dsfmt_t</a> *&nbsp;</td>
371 <td class="paramname"> <em>dsfmt</em>, </td>
372 </tr>
373 <tr>
374 <td class="paramkey"></td>
375 <td></td>
376 <td class="paramtype">double&nbsp;</td>
377 <td class="paramname"> <em>array</em>[], </td>
378 </tr>
379 <tr>
380 <td class="paramkey"></td>
381 <td></td>
382 <td class="paramtype">int&nbsp;</td>
383 <td class="paramname"> <em>size</em></td><td>&nbsp;</td>
384 </tr>
385 <tr>
386 <td></td>
387 <td>)</td>
388 <td></td><td></td><td width="100%"></td>
389 </tr>
390 </table>
391</div>
392<div class="memdoc">
393
394<p>
395This function generates double precision floating point pseudorandom numbers which distribute in the range [1, 2) to the specified array[] by one call.
396<p>
397The number of pseudorandom numbers is specified by the argument <b>size</b>, which must be at least (SFMT_MEXP / 128) * 2 and a multiple of two. The function <a class="el" href="d_s_f_m_t_8h.html#75ebedeed1c3d5e8576c53e5ce215fea" title="This function is just the same as dsfmt_get_min_array_size().">get_min_array_size()</a> returns this minimum size. The generation by this function is much faster than the following fill_array_xxx functions.<p>
398For initialization, <a class="el" href="d_s_f_m_t_8h.html#985425dba38a16554d3f2a9ee3a41e1b" title="This function is just the same as dsfmt_gv_init_gen_rand().">init_gen_rand()</a> or <a class="el" href="d_s_f_m_t_8h.html#5f12cfe61e34b29a9c4f88f097712205" title="This function is just the same as dsfmt_gv_init_by_array().">init_by_array()</a> must be called before the first call of this function. This function can not be used after calling genrand_xxx functions, without initialization.<p>
399<dl compact><dt><b>Parameters:</b></dt><dd>
400 <table border="0" cellspacing="2" cellpadding="0">
401 <tr><td valign="top"></td><td valign="top"><em>dsfmt</em>&nbsp;</td><td>dsfmt state vector. </td></tr>
402 <tr><td valign="top"></td><td valign="top"><em>array</em>&nbsp;</td><td>an array where pseudorandom numbers are filled by this function. The pointer to the array must be "aligned" (namely, must be a multiple of 16) in the SIMD version, since it refers to the address of a 128-bit integer. In the standard C version, the pointer is arbitrary.</td></tr>
403 <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>the number of 64-bit pseudorandom integers to be generated. size must be a multiple of 2, and greater than or equal to (SFMT_MEXP / 128) * 2.</td></tr>
404 </table>
405</dl>
406<dl class="note" compact><dt><b>Note:</b></dt><dd><b>memalign</b> or <b>posix_memalign</b> is available to get aligned memory. Mac OSX doesn't have these functions, but <b>malloc</b> of OSX returns the pointer to the aligned memory block. </dd></dl>
407
408<p>References <a class="el" href="d_s_f_m_t_8h-source.html#l00057">DSFMT_N64</a>, and <a class="el" href="d_s_f_m_t_8c-source.html#l00243">gen_rand_array_c1o2()</a>.</p>
409
410<p>Referenced by <a class="el" href="d_s_f_m_t_8h-source.html#l00379">dsfmt_gv_fill_array_close1_open2()</a>.</p>
411
412</div>
413</div><p>
414<a class="anchor" name="243fb9ed1b61233f3dba4ab15c541eb0"></a><!-- doxytag: member="dSFMT.c::dsfmt_fill_array_close_open" ref="243fb9ed1b61233f3dba4ab15c541eb0" args="(dsfmt_t *dsfmt, double array[], int size)" -->
415<div class="memitem">
416<div class="memproto">
417 <table class="memname">
418 <tr>
419 <td class="memname">void dsfmt_fill_array_close_open </td>
420 <td>(</td>
421 <td class="paramtype"><a class="el" href="struct_d_s_f_m_t___t.html">dsfmt_t</a> *&nbsp;</td>
422 <td class="paramname"> <em>dsfmt</em>, </td>
423 </tr>
424 <tr>
425 <td class="paramkey"></td>
426 <td></td>
427 <td class="paramtype">double&nbsp;</td>
428 <td class="paramname"> <em>array</em>[], </td>
429 </tr>
430 <tr>
431 <td class="paramkey"></td>
432 <td></td>
433 <td class="paramtype">int&nbsp;</td>
434 <td class="paramname"> <em>size</em></td><td>&nbsp;</td>
435 </tr>
436 <tr>
437 <td></td>
438 <td>)</td>
439 <td></td><td></td><td width="100%"></td>
440 </tr>
441 </table>
442</div>
443<div class="memdoc">
444
445<p>
446This function generates double precision floating point pseudorandom numbers which distribute in the range [0, 1) to the specified array[] by one call.
447<p>
448This function is the same as <a class="el" href="d_s_f_m_t_8h.html#98e1c0307c01044eb8d1c5136b59af9d" title="This function is juset the same as dsfmt_gv_fill_array_close1_open2().">fill_array_close1_open2()</a> except the distribution range.<p>
449<dl compact><dt><b>Parameters:</b></dt><dd>
450 <table border="0" cellspacing="2" cellpadding="0">
451 <tr><td valign="top"></td><td valign="top"><em>array</em>&nbsp;</td><td>an array where pseudorandom numbers are filled by this function. </td></tr>
452 <tr><td valign="top"></td><td valign="top"><em>dsfmt</em>&nbsp;</td><td>dsfmt state vector. </td></tr>
453 <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>the number of pseudorandom numbers to be generated. see also </td></tr>
454 </table>
455</dl>
456<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="d_s_f_m_t_8h.html#98e1c0307c01044eb8d1c5136b59af9d" title="This function is juset the same as dsfmt_gv_fill_array_close1_open2().">fill_array_close1_open2()</a> </dd></dl>
457
458<p>References <a class="el" href="d_s_f_m_t_8h-source.html#l00057">DSFMT_N64</a>, and <a class="el" href="d_s_f_m_t_8c-source.html#l00281">gen_rand_array_c0o1()</a>.</p>
459
460<p>Referenced by <a class="el" href="d_s_f_m_t_8h-source.html#l00411">dsfmt_gv_fill_array_close_open()</a>.</p>
461
462</div>
463</div><p>
464<a class="anchor" name="6ad6f12b9a47ea89ceab693b1eec5079"></a><!-- doxytag: member="dSFMT.c::dsfmt_fill_array_open_close" ref="6ad6f12b9a47ea89ceab693b1eec5079" args="(dsfmt_t *dsfmt, double array[], int size)" -->
465<div class="memitem">
466<div class="memproto">
467 <table class="memname">
468 <tr>
469 <td class="memname">void dsfmt_fill_array_open_close </td>
470 <td>(</td>
471 <td class="paramtype"><a class="el" href="struct_d_s_f_m_t___t.html">dsfmt_t</a> *&nbsp;</td>
472 <td class="paramname"> <em>dsfmt</em>, </td>
473 </tr>
474 <tr>
475 <td class="paramkey"></td>
476 <td></td>
477 <td class="paramtype">double&nbsp;</td>
478 <td class="paramname"> <em>array</em>[], </td>
479 </tr>
480 <tr>
481 <td class="paramkey"></td>
482 <td></td>
483 <td class="paramtype">int&nbsp;</td>
484 <td class="paramname"> <em>size</em></td><td>&nbsp;</td>
485 </tr>
486 <tr>
487 <td></td>
488 <td>)</td>
489 <td></td><td></td><td width="100%"></td>
490 </tr>
491 </table>
492</div>
493<div class="memdoc">
494
495<p>
496This function generates double precision floating point pseudorandom numbers which distribute in the range (0, 1] to the specified array[] by one call.
497<p>
498This function is the same as <a class="el" href="d_s_f_m_t_8h.html#98e1c0307c01044eb8d1c5136b59af9d" title="This function is juset the same as dsfmt_gv_fill_array_close1_open2().">fill_array_close1_open2()</a> except the distribution range.<p>
499<dl compact><dt><b>Parameters:</b></dt><dd>
500 <table border="0" cellspacing="2" cellpadding="0">
501 <tr><td valign="top"></td><td valign="top"><em>dsfmt</em>&nbsp;</td><td>dsfmt state vector. </td></tr>
502 <tr><td valign="top"></td><td valign="top"><em>array</em>&nbsp;</td><td>an array where pseudorandom numbers are filled by this function. </td></tr>
503 <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>the number of pseudorandom numbers to be generated. see also </td></tr>
504 </table>
505</dl>
506<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="d_s_f_m_t_8h.html#98e1c0307c01044eb8d1c5136b59af9d" title="This function is juset the same as dsfmt_gv_fill_array_close1_open2().">fill_array_close1_open2()</a> </dd></dl>
507
508<p>References <a class="el" href="d_s_f_m_t_8h-source.html#l00057">DSFMT_N64</a>, and <a class="el" href="d_s_f_m_t_8c-source.html#l00367">gen_rand_array_o0c1()</a>.</p>
509
510<p>Referenced by <a class="el" href="d_s_f_m_t_8h-source.html#l00395">dsfmt_gv_fill_array_open_close()</a>.</p>
511
512</div>
513</div><p>
514<a class="anchor" name="eed310e17f9f652c1b0ec86298c834c1"></a><!-- doxytag: member="dSFMT.c::dsfmt_fill_array_open_open" ref="eed310e17f9f652c1b0ec86298c834c1" args="(dsfmt_t *dsfmt, double array[], int size)" -->
515<div class="memitem">
516<div class="memproto">
517 <table class="memname">
518 <tr>
519 <td class="memname">void dsfmt_fill_array_open_open </td>
520 <td>(</td>
521 <td class="paramtype"><a class="el" href="struct_d_s_f_m_t___t.html">dsfmt_t</a> *&nbsp;</td>
522 <td class="paramname"> <em>dsfmt</em>, </td>
523 </tr>
524 <tr>
525 <td class="paramkey"></td>
526 <td></td>
527 <td class="paramtype">double&nbsp;</td>
528 <td class="paramname"> <em>array</em>[], </td>
529 </tr>
530 <tr>
531 <td class="paramkey"></td>
532 <td></td>
533 <td class="paramtype">int&nbsp;</td>
534 <td class="paramname"> <em>size</em></td><td>&nbsp;</td>
535 </tr>
536 <tr>
537 <td></td>
538 <td>)</td>
539 <td></td><td></td><td width="100%"></td>
540 </tr>
541 </table>
542</div>
543<div class="memdoc">
544
545<p>
546This function generates double precision floating point pseudorandom numbers which distribute in the range (0, 1) to the specified array[] by one call.
547<p>
548This function is the same as <a class="el" href="d_s_f_m_t_8h.html#98e1c0307c01044eb8d1c5136b59af9d" title="This function is juset the same as dsfmt_gv_fill_array_close1_open2().">fill_array_close1_open2()</a> except the distribution range.<p>
549<dl compact><dt><b>Parameters:</b></dt><dd>
550 <table border="0" cellspacing="2" cellpadding="0">
551 <tr><td valign="top"></td><td valign="top"><em>dsfmt</em>&nbsp;</td><td>dsfmt state vector. </td></tr>
552 <tr><td valign="top"></td><td valign="top"><em>array</em>&nbsp;</td><td>an array where pseudorandom numbers are filled by this function. </td></tr>
553 <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>the number of pseudorandom numbers to be generated. see also </td></tr>
554 </table>
555</dl>
556<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="d_s_f_m_t_8h.html#98e1c0307c01044eb8d1c5136b59af9d" title="This function is juset the same as dsfmt_gv_fill_array_close1_open2().">fill_array_close1_open2()</a> </dd></dl>
557
558<p>References <a class="el" href="d_s_f_m_t_8h-source.html#l00057">DSFMT_N64</a>, and <a class="el" href="d_s_f_m_t_8c-source.html#l00324">gen_rand_array_o0o1()</a>.</p>
559
560<p>Referenced by <a class="el" href="d_s_f_m_t_8h-source.html#l00427">dsfmt_gv_fill_array_open_open()</a>.</p>
561
562</div>
563</div><p>
564<a class="anchor" name="fccb1e4d75cea7ffe3b45cba53d1e5e0"></a><!-- doxytag: member="dSFMT.c::dsfmt_gen_rand_all" ref="fccb1e4d75cea7ffe3b45cba53d1e5e0" args="(dsfmt_t *dsfmt)" -->
565<div class="memitem">
566<div class="memproto">
567 <table class="memname">
568 <tr>
569 <td class="memname">void dsfmt_gen_rand_all </td>
570 <td>(</td>
571 <td class="paramtype"><a class="el" href="struct_d_s_f_m_t___t.html">dsfmt_t</a> *&nbsp;</td>
572 <td class="paramname"> <em>dsfmt</em> </td>
573 <td>&nbsp;)&nbsp;</td>
574 <td width="100%"></td>
575 </tr>
576 </table>
577</div>
578<div class="memdoc">
579
580<p>
581This function fills the internal state array with double precision floating point pseudorandom numbers of the IEEE 754 format.
582<p>
583<dl compact><dt><b>Parameters:</b></dt><dd>
584 <table border="0" cellspacing="2" cellpadding="0">
585 <tr><td valign="top"></td><td valign="top"><em>dsfmt</em>&nbsp;</td><td>dsfmt state vector. </td></tr>
586 </table>
587</dl>
588
589<p>References <a class="el" href="d_s_f_m_t_8c-source.html#l00153">do_recursion()</a>, <a class="el" href="d_s_f_m_t_8h-source.html#l00051">DSFMT_N</a>, and <a class="el" href="d_s_f_m_t_8h-source.html#l00163">DSFMT_T::status</a>.</p>
590
591<p>Referenced by <a class="el" href="d_s_f_m_t_8h-source.html#l00253">dsfmt_genrand_close1_open2()</a>, <a class="el" href="d_s_f_m_t_8h-source.html#l00341">dsfmt_genrand_open_open()</a>, and <a class="el" href="d_s_f_m_t_8h-source.html#l00232">dsfmt_genrand_uint32()</a>.</p>
592
593</div>
594</div><p>
595<a class="anchor" name="f181eeb77513e5a399dd2c585cfaa055"></a><!-- doxytag: member="dSFMT.c::dsfmt_get_idstring" ref="f181eeb77513e5a399dd2c585cfaa055" args="(void)" -->
596<div class="memitem">
597<div class="memproto">
598 <table class="memname">
599 <tr>
600 <td class="memname">const char* dsfmt_get_idstring </td>
601 <td>(</td>
602 <td class="paramtype">void&nbsp;</td>
603 <td class="paramname"> </td>
604 <td>&nbsp;)&nbsp;</td>
605 <td width="100%"></td>
606 </tr>
607 </table>
608</div>
609<div class="memdoc">
610
611<p>
612This function returns the identification string.
613<p>
614The string shows the Mersenne exponent, and all parameters of this generator. <dl class="return" compact><dt><b>Returns:</b></dt><dd>id string. </dd></dl>
615
616<p>Referenced by <a class="el" href="d_s_f_m_t_8h-source.html#l00499">get_idstring()</a>.</p>
617
618</div>
619</div><p>
620<a class="anchor" name="f49cc1703b4cc1d0bffbd895917c303a"></a><!-- doxytag: member="dSFMT.c::dsfmt_get_min_array_size" ref="f49cc1703b4cc1d0bffbd895917c303a" args="(void)" -->
621<div class="memitem">
622<div class="memproto">
623 <table class="memname">
624 <tr>
625 <td class="memname">int dsfmt_get_min_array_size </td>
626 <td>(</td>
627 <td class="paramtype">void&nbsp;</td>
628 <td class="paramname"> </td>
629 <td>&nbsp;)&nbsp;</td>
630 <td width="100%"></td>
631 </tr>
632 </table>
633</div>
634<div class="memdoc">
635
636<p>
637This function returns the minimum size of array used for <b>fill_array</b> functions.
638<p>
639<dl class="return" compact><dt><b>Returns:</b></dt><dd>minimum size of array used for fill_array functions. </dd></dl>
640
641<p>References <a class="el" href="d_s_f_m_t_8h-source.html#l00057">DSFMT_N64</a>.</p>
642
643<p>Referenced by <a class="el" href="d_s_f_m_t_8h-source.html#l00508">get_min_array_size()</a>.</p>
644
645</div>
646</div><p>
647<a class="anchor" name="0002bc60cd5c3227bd12f478a32463ba"></a><!-- doxytag: member="dSFMT.c::gen_rand_array_c0o1" ref="0002bc60cd5c3227bd12f478a32463ba" args="(dsfmt_t *dsfmt, w128_t *array, int size)" -->
648<div class="memitem">
649<div class="memproto">
650 <table class="memname">
651 <tr>
652 <td class="memname">static void gen_rand_array_c0o1 </td>
653 <td>(</td>
654 <td class="paramtype"><a class="el" href="struct_d_s_f_m_t___t.html">dsfmt_t</a> *&nbsp;</td>
655 <td class="paramname"> <em>dsfmt</em>, </td>
656 </tr>
657 <tr>
658 <td class="paramkey"></td>
659 <td></td>
660 <td class="paramtype"><a class="el" href="union_w128___t.html">w128_t</a> *&nbsp;</td>
661 <td class="paramname"> <em>array</em>, </td>
662 </tr>
663 <tr>
664 <td class="paramkey"></td>
665 <td></td>
666 <td class="paramtype">int&nbsp;</td>
667 <td class="paramname"> <em>size</em></td><td>&nbsp;</td>
668 </tr>
669 <tr>
670 <td></td>
671 <td>)</td>
672 <td></td><td></td><td width="100%"><code> [inline, static]</code></td>
673 </tr>
674 </table>
675</div>
676<div class="memdoc">
677
678<p>
679This function fills the user-specified array with double precision floating point pseudorandom numbers of the IEEE 754 format.
680<p>
681<dl compact><dt><b>Parameters:</b></dt><dd>
682 <table border="0" cellspacing="2" cellpadding="0">
683 <tr><td valign="top"></td><td valign="top"><em>dsfmt</em>&nbsp;</td><td>dsfmt state vector. </td></tr>
684 <tr><td valign="top"></td><td valign="top"><em>array</em>&nbsp;</td><td>an 128-bit array to be filled by pseudorandom numbers. </td></tr>
685 <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>number of 128-bit pseudorandom numbers to be generated. </td></tr>
686 </table>
687</dl>
688
689<p>References <a class="el" href="d_s_f_m_t_8c-source.html#l00206">convert_c0o1()</a>, <a class="el" href="d_s_f_m_t_8c-source.html#l00153">do_recursion()</a>, <a class="el" href="d_s_f_m_t_8h-source.html#l00051">DSFMT_N</a>, and <a class="el" href="d_s_f_m_t_8h-source.html#l00163">DSFMT_T::status</a>.</p>
690
691<p>Referenced by <a class="el" href="d_s_f_m_t_8c-source.html#l00591">dsfmt_fill_array_close_open()</a>.</p>
692
693</div>
694</div><p>
695<a class="anchor" name="a56a7244d54e2e8bb162a91ebe098e65"></a><!-- doxytag: member="dSFMT.c::gen_rand_array_c1o2" ref="a56a7244d54e2e8bb162a91ebe098e65" args="(dsfmt_t *dsfmt, w128_t *array, int size)" -->
696<div class="memitem">
697<div class="memproto">
698 <table class="memname">
699 <tr>
700 <td class="memname">static void gen_rand_array_c1o2 </td>
701 <td>(</td>
702 <td class="paramtype"><a class="el" href="struct_d_s_f_m_t___t.html">dsfmt_t</a> *&nbsp;</td>
703 <td class="paramname"> <em>dsfmt</em>, </td>
704 </tr>
705 <tr>
706 <td class="paramkey"></td>
707 <td></td>
708 <td class="paramtype"><a class="el" href="union_w128___t.html">w128_t</a> *&nbsp;</td>
709 <td class="paramname"> <em>array</em>, </td>
710 </tr>
711 <tr>
712 <td class="paramkey"></td>
713 <td></td>
714 <td class="paramtype">int&nbsp;</td>
715 <td class="paramname"> <em>size</em></td><td>&nbsp;</td>
716 </tr>
717 <tr>
718 <td></td>
719 <td>)</td>
720 <td></td><td></td><td width="100%"><code> [inline, static]</code></td>
721 </tr>
722 </table>
723</div>
724<div class="memdoc">
725
726<p>
727This function fills the user-specified array with double precision floating point pseudorandom numbers of the IEEE 754 format.
728<p>
729<dl compact><dt><b>Parameters:</b></dt><dd>
730 <table border="0" cellspacing="2" cellpadding="0">
731 <tr><td valign="top"></td><td valign="top"><em>dsfmt</em>&nbsp;</td><td>dsfmt state vector. </td></tr>
732 <tr><td valign="top"></td><td valign="top"><em>array</em>&nbsp;</td><td>an 128-bit array to be filled by pseudorandom numbers. </td></tr>
733 <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>number of 128-bit pseudorandom numbers to be generated. </td></tr>
734 </table>
735</dl>
736
737<p>References <a class="el" href="d_s_f_m_t_8c-source.html#l00153">do_recursion()</a>, <a class="el" href="d_s_f_m_t_8h-source.html#l00051">DSFMT_N</a>, and <a class="el" href="d_s_f_m_t_8h-source.html#l00163">DSFMT_T::status</a>.</p>
738
739<p>Referenced by <a class="el" href="d_s_f_m_t_8c-source.html#l00555">dsfmt_fill_array_close1_open2()</a>.</p>
740
741</div>
742</div><p>
743<a class="anchor" name="0905d57b8333da366b25773f0b3c5326"></a><!-- doxytag: member="dSFMT.c::gen_rand_array_o0c1" ref="0905d57b8333da366b25773f0b3c5326" args="(dsfmt_t *dsfmt, w128_t *array, int size)" -->
744<div class="memitem">
745<div class="memproto">
746 <table class="memname">
747 <tr>
748 <td class="memname">static void gen_rand_array_o0c1 </td>
749 <td>(</td>
750 <td class="paramtype"><a class="el" href="struct_d_s_f_m_t___t.html">dsfmt_t</a> *&nbsp;</td>
751 <td class="paramname"> <em>dsfmt</em>, </td>
752 </tr>
753 <tr>
754 <td class="paramkey"></td>
755 <td></td>
756 <td class="paramtype"><a class="el" href="union_w128___t.html">w128_t</a> *&nbsp;</td>
757 <td class="paramname"> <em>array</em>, </td>
758 </tr>
759 <tr>
760 <td class="paramkey"></td>
761 <td></td>
762 <td class="paramtype">int&nbsp;</td>
763 <td class="paramname"> <em>size</em></td><td>&nbsp;</td>
764 </tr>
765 <tr>
766 <td></td>
767 <td>)</td>
768 <td></td><td></td><td width="100%"><code> [inline, static]</code></td>
769 </tr>
770 </table>
771</div>
772<div class="memdoc">
773
774<p>
775This function fills the user-specified array with double precision floating point pseudorandom numbers of the IEEE 754 format.
776<p>
777<dl compact><dt><b>Parameters:</b></dt><dd>
778 <table border="0" cellspacing="2" cellpadding="0">
779 <tr><td valign="top"></td><td valign="top"><em>dsfmt</em>&nbsp;</td><td>dsfmt state vector. </td></tr>
780 <tr><td valign="top"></td><td valign="top"><em>array</em>&nbsp;</td><td>an 128-bit array to be filled by pseudorandom numbers. </td></tr>
781 <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>number of 128-bit pseudorandom numbers to be generated. </td></tr>
782 </table>
783</dl>
784
785<p>References <a class="el" href="d_s_f_m_t_8c-source.html#l00217">convert_o0c1()</a>, <a class="el" href="d_s_f_m_t_8c-source.html#l00153">do_recursion()</a>, <a class="el" href="d_s_f_m_t_8h-source.html#l00051">DSFMT_N</a>, and <a class="el" href="d_s_f_m_t_8h-source.html#l00163">DSFMT_T::status</a>.</p>
786
787<p>Referenced by <a class="el" href="d_s_f_m_t_8c-source.html#l00573">dsfmt_fill_array_open_close()</a>.</p>
788
789</div>
790</div><p>
791<a class="anchor" name="2bad2f5ded750e7c250a121cdb61166e"></a><!-- doxytag: member="dSFMT.c::gen_rand_array_o0o1" ref="2bad2f5ded750e7c250a121cdb61166e" args="(dsfmt_t *dsfmt, w128_t *array, int size)" -->
792<div class="memitem">
793<div class="memproto">
794 <table class="memname">
795 <tr>
796 <td class="memname">static void gen_rand_array_o0o1 </td>
797 <td>(</td>
798 <td class="paramtype"><a class="el" href="struct_d_s_f_m_t___t.html">dsfmt_t</a> *&nbsp;</td>
799 <td class="paramname"> <em>dsfmt</em>, </td>
800 </tr>
801 <tr>
802 <td class="paramkey"></td>
803 <td></td>
804 <td class="paramtype"><a class="el" href="union_w128___t.html">w128_t</a> *&nbsp;</td>
805 <td class="paramname"> <em>array</em>, </td>
806 </tr>
807 <tr>
808 <td class="paramkey"></td>
809 <td></td>
810 <td class="paramtype">int&nbsp;</td>
811 <td class="paramname"> <em>size</em></td><td>&nbsp;</td>
812 </tr>
813 <tr>
814 <td></td>
815 <td>)</td>
816 <td></td><td></td><td width="100%"><code> [inline, static]</code></td>
817 </tr>
818 </table>
819</div>
820<div class="memdoc">
821
822<p>
823This function fills the user-specified array with double precision floating point pseudorandom numbers of the IEEE 754 format.
824<p>
825<dl compact><dt><b>Parameters:</b></dt><dd>
826 <table border="0" cellspacing="2" cellpadding="0">
827 <tr><td valign="top"></td><td valign="top"><em>dsfmt</em>&nbsp;</td><td>dsfmt state vector. </td></tr>
828 <tr><td valign="top"></td><td valign="top"><em>array</em>&nbsp;</td><td>an 128-bit array to be filled by pseudorandom numbers. </td></tr>
829 <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>number of 128-bit pseudorandom numbers to be generated. </td></tr>
830 </table>
831</dl>
832
833<p>References <a class="el" href="d_s_f_m_t_8c-source.html#l00228">convert_o0o1()</a>, <a class="el" href="d_s_f_m_t_8c-source.html#l00153">do_recursion()</a>, <a class="el" href="d_s_f_m_t_8h-source.html#l00051">DSFMT_N</a>, and <a class="el" href="d_s_f_m_t_8h-source.html#l00163">DSFMT_T::status</a>.</p>
834
835<p>Referenced by <a class="el" href="d_s_f_m_t_8c-source.html#l00609">dsfmt_fill_array_open_open()</a>.</p>
836
837</div>
838</div><p>
839<a class="anchor" name="6ceeab85133c3fd7ec95aa85523ff544"></a><!-- doxytag: member="dSFMT.c::idxof" ref="6ceeab85133c3fd7ec95aa85523ff544" args="(int i)" -->
840<div class="memitem">
841<div class="memproto">
842 <table class="memname">
843 <tr>
844 <td class="memname">static int idxof </td>
845 <td>(</td>
846 <td class="paramtype">int&nbsp;</td>
847 <td class="paramname"> <em>i</em> </td>
848 <td>&nbsp;)&nbsp;</td>
849 <td width="100%"><code> [inline, static]</code></td>
850 </tr>
851 </table>
852</div>
853<div class="memdoc">
854
855<p>
856This function simulate a 32-bit array index overlapped to 64-bit array of LITTLE ENDIAN in BIG ENDIAN machine.
857<p>
858
859<p>Referenced by <a class="el" href="d_s_f_m_t_8c-source.html#l00656">dsfmt_chk_init_by_array()</a>, and <a class="el" href="d_s_f_m_t_8c-source.html#l00625">dsfmt_chk_init_gen_rand()</a>.</p>
860
861</div>
862</div><p>
863<a class="anchor" name="fe0e4e5727d9188f5ae1632da731d412"></a><!-- doxytag: member="dSFMT.c::ini_func1" ref="fe0e4e5727d9188f5ae1632da731d412" args="(uint32_t x)" -->
864<div class="memitem">
865<div class="memproto">
866 <table class="memname">
867 <tr>
868 <td class="memname">static uint32_t ini_func1 </td>
869 <td>(</td>
870 <td class="paramtype">uint32_t&nbsp;</td>
871 <td class="paramname"> <em>x</em> </td>
872 <td>&nbsp;)&nbsp;</td>
873 <td width="100%"><code> [inline, static]</code></td>
874 </tr>
875 </table>
876</div>
877<div class="memdoc">
878
879<p>
880This function represents a function used in the initialization by init_by_array.
881<p>
882<dl compact><dt><b>Parameters:</b></dt><dd>
883 <table border="0" cellspacing="2" cellpadding="0">
884 <tr><td valign="top"></td><td valign="top"><em>x</em>&nbsp;</td><td>32-bit integer </td></tr>
885 </table>
886</dl>
887<dl class="return" compact><dt><b>Returns:</b></dt><dd>32-bit integer </dd></dl>
888
889<p>Referenced by <a class="el" href="d_s_f_m_t_8c-source.html#l00656">dsfmt_chk_init_by_array()</a>.</p>
890
891</div>
892</div><p>
893<a class="anchor" name="8da6197e2fe073abb9016e3cf4822807"></a><!-- doxytag: member="dSFMT.c::ini_func2" ref="8da6197e2fe073abb9016e3cf4822807" args="(uint32_t x)" -->
894<div class="memitem">
895<div class="memproto">
896 <table class="memname">
897 <tr>
898 <td class="memname">static uint32_t ini_func2 </td>
899 <td>(</td>
900 <td class="paramtype">uint32_t&nbsp;</td>
901 <td class="paramname"> <em>x</em> </td>
902 <td>&nbsp;)&nbsp;</td>
903 <td width="100%"><code> [inline, static]</code></td>
904 </tr>
905 </table>
906</div>
907<div class="memdoc">
908
909<p>
910This function represents a function used in the initialization by init_by_array.
911<p>
912<dl compact><dt><b>Parameters:</b></dt><dd>
913 <table border="0" cellspacing="2" cellpadding="0">
914 <tr><td valign="top"></td><td valign="top"><em>x</em>&nbsp;</td><td>32-bit integer </td></tr>
915 </table>
916</dl>
917<dl class="return" compact><dt><b>Returns:</b></dt><dd>32-bit integer </dd></dl>
918
919<p>Referenced by <a class="el" href="d_s_f_m_t_8c-source.html#l00656">dsfmt_chk_init_by_array()</a>.</p>
920
921</div>
922</div><p>
923<a class="anchor" name="95a1673e2b7b3a48a7eab8fa19e18e1d"></a><!-- doxytag: member="dSFMT.c::initial_mask" ref="95a1673e2b7b3a48a7eab8fa19e18e1d" args="(dsfmt_t *dsfmt)" -->
924<div class="memitem">
925<div class="memproto">
926 <table class="memname">
927 <tr>
928 <td class="memname">static void initial_mask </td>
929 <td>(</td>
930 <td class="paramtype"><a class="el" href="struct_d_s_f_m_t___t.html">dsfmt_t</a> *&nbsp;</td>
931 <td class="paramname"> <em>dsfmt</em> </td>
932 <td>&nbsp;)&nbsp;</td>
933 <td width="100%"><code> [static]</code></td>
934 </tr>
935 </table>
936</div>
937<div class="memdoc">
938
939<p>
940This function initializes the internal state array to fit the IEEE 754 format.
941<p>
942<dl compact><dt><b>Parameters:</b></dt><dd>
943 <table border="0" cellspacing="2" cellpadding="0">
944 <tr><td valign="top"></td><td valign="top"><em>dsfmt</em>&nbsp;</td><td>dsfmt state vector. </td></tr>
945 </table>
946</dl>
947
948<p>References <a class="el" href="d_s_f_m_t_8h-source.html#l00051">DSFMT_N</a>, <a class="el" href="d_s_f_m_t_8h-source.html#l00163">DSFMT_T::status</a>, and <a class="el" href="d_s_f_m_t_8h-source.html#l00152">W128_T::u</a>.</p>
949
950<p>Referenced by <a class="el" href="d_s_f_m_t_8c-source.html#l00656">dsfmt_chk_init_by_array()</a>, and <a class="el" href="d_s_f_m_t_8c-source.html#l00625">dsfmt_chk_init_gen_rand()</a>.</p>
951
952</div>
953</div><p>
954<a class="anchor" name="8c0334eb83e12d16f2cfe48929114e44"></a><!-- doxytag: member="dSFMT.c::period_certification" ref="8c0334eb83e12d16f2cfe48929114e44" args="(dsfmt_t *dsfmt)" -->
955<div class="memitem">
956<div class="memproto">
957 <table class="memname">
958 <tr>
959 <td class="memname">static void period_certification </td>
960 <td>(</td>
961 <td class="paramtype"><a class="el" href="struct_d_s_f_m_t___t.html">dsfmt_t</a> *&nbsp;</td>
962 <td class="paramname"> <em>dsfmt</em> </td>
963 <td>&nbsp;)&nbsp;</td>
964 <td width="100%"><code> [static]</code></td>
965 </tr>
966 </table>
967</div>
968<div class="memdoc">
969
970<p>
971This function certificate the period of 2^{SFMT_MEXP}-1.
972<p>
973<dl compact><dt><b>Parameters:</b></dt><dd>
974 <table border="0" cellspacing="2" cellpadding="0">
975 <tr><td valign="top"></td><td valign="top"><em>dsfmt</em>&nbsp;</td><td>dsfmt state vector. </td></tr>
976 </table>
977</dl>
978
979<p>References <a class="el" href="d_s_f_m_t_8h-source.html#l00051">DSFMT_N</a>, <a class="el" href="d_s_f_m_t_8h-source.html#l00163">DSFMT_T::status</a>, and <a class="el" href="d_s_f_m_t_8h-source.html#l00152">W128_T::u</a>.</p>
980
981<p>Referenced by <a class="el" href="d_s_f_m_t_8c-source.html#l00656">dsfmt_chk_init_by_array()</a>, and <a class="el" href="d_s_f_m_t_8c-source.html#l00625">dsfmt_chk_init_gen_rand()</a>.</p>
982
983</div>
984</div><p>
985<hr><h2>Variable Documentation</h2>
986<a class="anchor" name="dfee3c4c3505ddcfc334251f94968737"></a><!-- doxytag: member="dSFMT.c::dsfmt_global_data" ref="dfee3c4c3505ddcfc334251f94968737" args="" -->
987<div class="memitem">
988<div class="memproto">
989 <table class="memname">
990 <tr>
991 <td class="memname"><a class="el" href="struct_d_s_f_m_t___t.html">dsfmt_t</a> <a class="el" href="d_s_f_m_t_8c.html#dfee3c4c3505ddcfc334251f94968737">dsfmt_global_data</a> </td>
992 </tr>
993 </table>
994</div>
995<div class="memdoc">
996
997<p>
998dsfmt internal state vector
999<p>
1000
1001<p>Referenced by <a class="el" href="d_s_f_m_t_8h-source.html#l00379">dsfmt_gv_fill_array_close1_open2()</a>, <a class="el" href="d_s_f_m_t_8h-source.html#l00411">dsfmt_gv_fill_array_close_open()</a>, <a class="el" href="d_s_f_m_t_8h-source.html#l00395">dsfmt_gv_fill_array_open_close()</a>, <a class="el" href="d_s_f_m_t_8h-source.html#l00427">dsfmt_gv_fill_array_open_open()</a>, <a class="el" href="d_s_f_m_t_8h-source.html#l00283">dsfmt_gv_genrand_close1_open2()</a>, <a class="el" href="d_s_f_m_t_8h-source.html#l00364">dsfmt_gv_genrand_open_open()</a>, <a class="el" href="d_s_f_m_t_8h-source.html#l00272">dsfmt_gv_genrand_uint32()</a>, <a class="el" href="d_s_f_m_t_8h-source.html#l00471">dsfmt_gv_init_by_array()</a>, and <a class="el" href="d_s_f_m_t_8h-source.html#l00447">dsfmt_gv_init_gen_rand()</a>.</p>
1002
1003</div>
1004</div><p>
1005<a class="anchor" name="3720bab32cfc7fed812b49d96cde8636"></a><!-- doxytag: member="dSFMT.c::dsfmt_mexp" ref="3720bab32cfc7fed812b49d96cde8636" args="" -->
1006<div class="memitem">
1007<div class="memproto">
1008 <table class="memname">
1009 <tr>
1010 <td class="memname">const int <a class="el" href="d_s_f_m_t_8c.html#3720bab32cfc7fed812b49d96cde8636">dsfmt_mexp</a> = DSFMT_MEXP<code> [static]</code> </td>
1011 </tr>
1012 </table>
1013</div>
1014<div class="memdoc">
1015
1016<p>
1017dsfmt mexp for check
1018<p>
1019
1020<p>Referenced by <a class="el" href="d_s_f_m_t_8c-source.html#l00656">dsfmt_chk_init_by_array()</a>, and <a class="el" href="d_s_f_m_t_8c-source.html#l00625">dsfmt_chk_init_gen_rand()</a>.</p>
1021
1022</div>
1023</div><p>
1024</div>
1025<hr size="1"><address style="text-align: right;"><small>Generated on Sat Apr 18 11:08:43 2009 for dSFMT by&nbsp;
1026<a href="http://www.doxygen.org/index.html">
1027<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
1028</body>
1029</html>
Note: See TracBrowser for help on using the repository browser.