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">
7 <!-- Generated by Doxygen 1.5.5 -->
8 <div class=
"navigation" id=
"top">
11 <li><a href=
"index.html"><span>Main
Page
</span></a></li>
12 <li><a href=
"annotated.html"><span>Data
Structures
</span></a></li>
13 <li class=
"current"><a href=
"files.html"><span>Files
</span></a></li>
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>
20 <code>#include
<stdio.h
></code><br>
21 <code>#include
<string.h
></code><br>
22 <code>#include
<stdlib.h
></code><br>
23 <code>#include
"dSFMT-params.h
"</code><br>
24 <table border=
"0" cellpadding=
"0" cellspacing=
"0">
26 <tr><td colspan=
"2"><br><h2>Functions
</h2></td></tr>
27 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">static uint32_t
</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>
29 <tr><td class=
"mdescLeft"> </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
</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>
32 <tr><td class=
"mdescLeft"> </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
</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>
35 <tr><td class=
"mdescLeft"> </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
</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>
38 <tr><td class=
"mdescLeft"> </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
</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>
41 <tr><td class=
"mdescLeft"> </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
</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>
44 <tr><td class=
"mdescLeft"> </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
</td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"d_s_f_m_t_8c.html#6ceeab85133c3fd7ec95aa85523ff544">idxof
</a> (int i)
</td></tr>
47 <tr><td class=
"mdescLeft"> </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
</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>
50 <tr><td class=
"mdescLeft"> </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
</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>
53 <tr><td class=
"mdescLeft"> </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
</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>
56 <tr><td class=
"mdescLeft"> </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
</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>
59 <tr><td class=
"mdescLeft"> </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
</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>
62 <tr><td class=
"mdescLeft"> </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
</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>
65 <tr><td class=
"mdescLeft"> </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 *
</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>
68 <tr><td class=
"mdescLeft"> </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
</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>
71 <tr><td class=
"mdescLeft"> </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
</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>
74 <tr><td class=
"mdescLeft"> </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
</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>
77 <tr><td class=
"mdescLeft"> </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
</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>
80 <tr><td class=
"mdescLeft"> </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
</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>
83 <tr><td class=
"mdescLeft"> </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
</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>
86 <tr><td class=
"mdescLeft"> </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
</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>
89 <tr><td class=
"mdescLeft"> </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
</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>
92 <tr><td class=
"mdescLeft"> </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> </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"d_s_f_m_t_8c.html#dfee3c4c3505ddcfc334251f94968737">dsfmt_global_data
</a></td></tr>
96 <tr><td class=
"mdescLeft"> </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
</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>
99 <tr><td class=
"mdescLeft"> </td><td class=
"mdescRight">dsfmt mexp for check
<a href=
"#3720bab32cfc7fed812b49d96cde8636"></a><br></td></tr>
101 <hr><a name=
"_details"></a><h2>Detailed Description
</h2>
102 double precision SIMD-oriented Fast Mersenne Twister (dSFMT) based on IEEE
754 format.
104 <dl class=
"author" compact
><dt><b>Author:
</b></dt><dd>Mutsuo Saito (Hiroshima University)
<p>
105 Makoto Matsumoto (Hiroshima University)
</dd></dl>
106 Copyright (C)
2007,
2008 Mutsuo Saito, Makoto Matsumoto and Hiroshima University. All rights reserved.
<p>
107 The 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">
113 <td class=
"memname">static void convert_c0o1
</td>
115 <td class=
"paramtype"><a class=
"el" href=
"union_w128___t.html">w128_t
</a> *
</td>
116 <td class=
"paramname"> <em>w
</em> </td>
117 <td> )
</td>
118 <td width=
"100%"><code> [inline, static]
</code></td>
125 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).
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> </td><td>128bit stracture of double precision floating point numbers (I/O)
</td></tr>
133 <p>References
<a class=
"el" href=
"d_s_f_m_t_8h-source.html#l00154">W128_T::d
</a>.
</p>
135 <p>Referenced by
<a class=
"el" href=
"d_s_f_m_t_8c-source.html#l00281">gen_rand_array_c0o1()
</a>.
</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">
144 <td class=
"memname">static void convert_o0c1
</td>
146 <td class=
"paramtype"><a class=
"el" href=
"union_w128___t.html">w128_t
</a> *
</td>
147 <td class=
"paramname"> <em>w
</em> </td>
148 <td> )
</td>
149 <td width=
"100%"><code> [inline, static]
</code></td>
156 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].
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> </td><td>128bit stracture of double precision floating point numbers (I/O)
</td></tr>
164 <p>References
<a class=
"el" href=
"d_s_f_m_t_8h-source.html#l00154">W128_T::d
</a>.
</p>
166 <p>Referenced by
<a class=
"el" href=
"d_s_f_m_t_8c-source.html#l00367">gen_rand_array_o0c1()
</a>.
</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">
175 <td class=
"memname">static void convert_o0o1
</td>
177 <td class=
"paramtype"><a class=
"el" href=
"union_w128___t.html">w128_t
</a> *
</td>
178 <td class=
"paramname"> <em>w
</em> </td>
179 <td> )
</td>
180 <td width=
"100%"><code> [inline, static]
</code></td>
187 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).
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> </td><td>128bit stracture of double precision floating point numbers (I/O)
</td></tr>
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>
197 <p>Referenced by
<a class=
"el" href=
"d_s_f_m_t_8c-source.html#l00324">gen_rand_array_o0o1()
</a>.
</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">
206 <td class=
"memname">static void do_recursion
</td>
208 <td class=
"paramtype"><a class=
"el" href=
"union_w128___t.html">w128_t
</a> *
</td>
209 <td class=
"paramname"> <em>r
</em>,
</td>
212 <td class=
"paramkey"></td>
214 <td class=
"paramtype"><a class=
"el" href=
"union_w128___t.html">w128_t
</a> *
</td>
215 <td class=
"paramname"> <em>a
</em>,
</td>
218 <td class=
"paramkey"></td>
220 <td class=
"paramtype"><a class=
"el" href=
"union_w128___t.html">w128_t
</a> *
</td>
221 <td class=
"paramname"> <em>b
</em>,
</td>
224 <td class=
"paramkey"></td>
226 <td class=
"paramtype"><a class=
"el" href=
"union_w128___t.html">w128_t
</a> *
</td>
227 <td class=
"paramname"> <em>lung
</em></td><td> </td>
232 <td></td><td></td><td width=
"100%"><code> [inline, static]
</code></td>
239 This function represents the recursion formula.
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> </td><td>output
</td></tr>
244 <tr><td valign=
"top"></td><td valign=
"top"><em>a
</em> </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> </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> </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> </td><td>output
128-bit
</td></tr>
248 <tr><td valign=
"top"></td><td valign=
"top"><em>a
</em> </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> </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> </td><td>a
128-bit part of the internal state array (I/O)
</td></tr>
254 <p>References
<a class=
"el" href=
"d_s_f_m_t_8h-source.html#l00152">W128_T::u
</a>.
</p>
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>
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">
265 <td class=
"memname">void dsfmt_chk_init_by_array
</td>
267 <td class=
"paramtype"><a class=
"el" href=
"struct_d_s_f_m_t___t.html">dsfmt_t
</a> *
</td>
268 <td class=
"paramname"> <em>dsfmt
</em>,
</td>
271 <td class=
"paramkey"></td>
273 <td class=
"paramtype">uint32_t
</td>
274 <td class=
"paramname"> <em>init_key
</em>[],
</td>
277 <td class=
"paramkey"></td>
279 <td class=
"paramtype">int
</td>
280 <td class=
"paramname"> <em>key_length
</em>,
</td>
283 <td class=
"paramkey"></td>
285 <td class=
"paramtype">int
</td>
286 <td class=
"paramname"> <em>mexp
</em></td><td> </td>
291 <td></td><td></td><td width=
"100%"></td>
298 This function initializes the internal state array, with an array of
32-bit integers used as the seeds.
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> </td><td>dsfmt state vector.
</td></tr>
303 <tr><td valign=
"top"></td><td valign=
"top"><em>init_key
</em> </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> </td><td>the length of init_key.
</td></tr>
305 <tr><td valign=
"top"></td><td valign=
"top"><em>mexp
</em> </td><td>caller's mersenne expornent
</td></tr>
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>
311 <p>Referenced by
<a class=
"el" href=
"d_s_f_m_t_8h-source.html#l00458">dsfmt_init_by_array()
</a>.
</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">
320 <td class=
"memname">void dsfmt_chk_init_gen_rand
</td>
322 <td class=
"paramtype"><a class=
"el" href=
"struct_d_s_f_m_t___t.html">dsfmt_t
</a> *
</td>
323 <td class=
"paramname"> <em>dsfmt
</em>,
</td>
326 <td class=
"paramkey"></td>
328 <td class=
"paramtype">uint32_t
</td>
329 <td class=
"paramname"> <em>seed
</em>,
</td>
332 <td class=
"paramkey"></td>
334 <td class=
"paramtype">int
</td>
335 <td class=
"paramname"> <em>mexp
</em></td><td> </td>
340 <td></td><td></td><td width=
"100%"></td>
347 This function initializes the internal state array with a
32-bit integer seed.
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> </td><td>dsfmt state vector.
</td></tr>
352 <tr><td valign=
"top"></td><td valign=
"top"><em>seed
</em> </td><td>a
32-bit integer used as the seed.
</td></tr>
353 <tr><td valign=
"top"></td><td valign=
"top"><em>mexp
</em> </td><td>caller's mersenne expornent
</td></tr>
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>
359 <p>Referenced by
<a class=
"el" href=
"d_s_f_m_t_8h-source.html#l00437">dsfmt_init_gen_rand()
</a>.
</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">
368 <td class=
"memname">void dsfmt_fill_array_close1_open2
</td>
370 <td class=
"paramtype"><a class=
"el" href=
"struct_d_s_f_m_t___t.html">dsfmt_t
</a> *
</td>
371 <td class=
"paramname"> <em>dsfmt
</em>,
</td>
374 <td class=
"paramkey"></td>
376 <td class=
"paramtype">double
</td>
377 <td class=
"paramname"> <em>array
</em>[],
</td>
380 <td class=
"paramkey"></td>
382 <td class=
"paramtype">int
</td>
383 <td class=
"paramname"> <em>size
</em></td><td> </td>
388 <td></td><td></td><td width=
"100%"></td>
395 This function generates double precision floating point pseudorandom numbers which distribute in the range [
1,
2) to the specified array[] by one call.
397 The 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>
398 For 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> </td><td>dsfmt state vector.
</td></tr>
402 <tr><td valign=
"top"></td><td valign=
"top"><em>array
</em> </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> </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>
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>
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>
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>
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">
419 <td class=
"memname">void dsfmt_fill_array_close_open
</td>
421 <td class=
"paramtype"><a class=
"el" href=
"struct_d_s_f_m_t___t.html">dsfmt_t
</a> *
</td>
422 <td class=
"paramname"> <em>dsfmt
</em>,
</td>
425 <td class=
"paramkey"></td>
427 <td class=
"paramtype">double
</td>
428 <td class=
"paramname"> <em>array
</em>[],
</td>
431 <td class=
"paramkey"></td>
433 <td class=
"paramtype">int
</td>
434 <td class=
"paramname"> <em>size
</em></td><td> </td>
439 <td></td><td></td><td width=
"100%"></td>
446 This function generates double precision floating point pseudorandom numbers which distribute in the range [
0,
1) to the specified array[] by one call.
448 This 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> </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> </td><td>dsfmt state vector.
</td></tr>
453 <tr><td valign=
"top"></td><td valign=
"top"><em>size
</em> </td><td>the number of pseudorandom numbers to be generated. see also
</td></tr>
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>
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>
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>
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">
469 <td class=
"memname">void dsfmt_fill_array_open_close
</td>
471 <td class=
"paramtype"><a class=
"el" href=
"struct_d_s_f_m_t___t.html">dsfmt_t
</a> *
</td>
472 <td class=
"paramname"> <em>dsfmt
</em>,
</td>
475 <td class=
"paramkey"></td>
477 <td class=
"paramtype">double
</td>
478 <td class=
"paramname"> <em>array
</em>[],
</td>
481 <td class=
"paramkey"></td>
483 <td class=
"paramtype">int
</td>
484 <td class=
"paramname"> <em>size
</em></td><td> </td>
489 <td></td><td></td><td width=
"100%"></td>
496 This function generates double precision floating point pseudorandom numbers which distribute in the range (
0,
1] to the specified array[] by one call.
498 This 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> </td><td>dsfmt state vector.
</td></tr>
502 <tr><td valign=
"top"></td><td valign=
"top"><em>array
</em> </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> </td><td>the number of pseudorandom numbers to be generated. see also
</td></tr>
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>
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>
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>
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">
519 <td class=
"memname">void dsfmt_fill_array_open_open
</td>
521 <td class=
"paramtype"><a class=
"el" href=
"struct_d_s_f_m_t___t.html">dsfmt_t
</a> *
</td>
522 <td class=
"paramname"> <em>dsfmt
</em>,
</td>
525 <td class=
"paramkey"></td>
527 <td class=
"paramtype">double
</td>
528 <td class=
"paramname"> <em>array
</em>[],
</td>
531 <td class=
"paramkey"></td>
533 <td class=
"paramtype">int
</td>
534 <td class=
"paramname"> <em>size
</em></td><td> </td>
539 <td></td><td></td><td width=
"100%"></td>
546 This function generates double precision floating point pseudorandom numbers which distribute in the range (
0,
1) to the specified array[] by one call.
548 This 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> </td><td>dsfmt state vector.
</td></tr>
552 <tr><td valign=
"top"></td><td valign=
"top"><em>array
</em> </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> </td><td>the number of pseudorandom numbers to be generated. see also
</td></tr>
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>
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>
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>
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">
569 <td class=
"memname">void dsfmt_gen_rand_all
</td>
571 <td class=
"paramtype"><a class=
"el" href=
"struct_d_s_f_m_t___t.html">dsfmt_t
</a> *
</td>
572 <td class=
"paramname"> <em>dsfmt
</em> </td>
573 <td> )
</td>
574 <td width=
"100%"></td>
581 This function fills the internal state array with double precision floating point pseudorandom numbers of the IEEE
754 format.
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> </td><td>dsfmt state vector.
</td></tr>
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>
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>
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">
600 <td class=
"memname">const char* dsfmt_get_idstring
</td>
602 <td class=
"paramtype">void
</td>
603 <td class=
"paramname"> </td>
604 <td> )
</td>
605 <td width=
"100%"></td>
612 This function returns the identification string.
614 The 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>
616 <p>Referenced by
<a class=
"el" href=
"d_s_f_m_t_8h-source.html#l00499">get_idstring()
</a>.
</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">
625 <td class=
"memname">int dsfmt_get_min_array_size
</td>
627 <td class=
"paramtype">void
</td>
628 <td class=
"paramname"> </td>
629 <td> )
</td>
630 <td width=
"100%"></td>
637 This function returns the minimum size of array used for
<b>fill_array
</b> functions.
639 <dl class=
"return" compact
><dt><b>Returns:
</b></dt><dd>minimum size of array used for fill_array functions.
</dd></dl>
641 <p>References
<a class=
"el" href=
"d_s_f_m_t_8h-source.html#l00057">DSFMT_N64
</a>.
</p>
643 <p>Referenced by
<a class=
"el" href=
"d_s_f_m_t_8h-source.html#l00508">get_min_array_size()
</a>.
</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">
652 <td class=
"memname">static void gen_rand_array_c0o1
</td>
654 <td class=
"paramtype"><a class=
"el" href=
"struct_d_s_f_m_t___t.html">dsfmt_t
</a> *
</td>
655 <td class=
"paramname"> <em>dsfmt
</em>,
</td>
658 <td class=
"paramkey"></td>
660 <td class=
"paramtype"><a class=
"el" href=
"union_w128___t.html">w128_t
</a> *
</td>
661 <td class=
"paramname"> <em>array
</em>,
</td>
664 <td class=
"paramkey"></td>
666 <td class=
"paramtype">int
</td>
667 <td class=
"paramname"> <em>size
</em></td><td> </td>
672 <td></td><td></td><td width=
"100%"><code> [inline, static]
</code></td>
679 This function fills the user-specified array with double precision floating point pseudorandom numbers of the IEEE
754 format.
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> </td><td>dsfmt state vector.
</td></tr>
684 <tr><td valign=
"top"></td><td valign=
"top"><em>array
</em> </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> </td><td>number of
128-bit pseudorandom numbers to be generated.
</td></tr>
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>
691 <p>Referenced by
<a class=
"el" href=
"d_s_f_m_t_8c-source.html#l00591">dsfmt_fill_array_close_open()
</a>.
</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">
700 <td class=
"memname">static void gen_rand_array_c1o2
</td>
702 <td class=
"paramtype"><a class=
"el" href=
"struct_d_s_f_m_t___t.html">dsfmt_t
</a> *
</td>
703 <td class=
"paramname"> <em>dsfmt
</em>,
</td>
706 <td class=
"paramkey"></td>
708 <td class=
"paramtype"><a class=
"el" href=
"union_w128___t.html">w128_t
</a> *
</td>
709 <td class=
"paramname"> <em>array
</em>,
</td>
712 <td class=
"paramkey"></td>
714 <td class=
"paramtype">int
</td>
715 <td class=
"paramname"> <em>size
</em></td><td> </td>
720 <td></td><td></td><td width=
"100%"><code> [inline, static]
</code></td>
727 This function fills the user-specified array with double precision floating point pseudorandom numbers of the IEEE
754 format.
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> </td><td>dsfmt state vector.
</td></tr>
732 <tr><td valign=
"top"></td><td valign=
"top"><em>array
</em> </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> </td><td>number of
128-bit pseudorandom numbers to be generated.
</td></tr>
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>
739 <p>Referenced by
<a class=
"el" href=
"d_s_f_m_t_8c-source.html#l00555">dsfmt_fill_array_close1_open2()
</a>.
</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">
748 <td class=
"memname">static void gen_rand_array_o0c1
</td>
750 <td class=
"paramtype"><a class=
"el" href=
"struct_d_s_f_m_t___t.html">dsfmt_t
</a> *
</td>
751 <td class=
"paramname"> <em>dsfmt
</em>,
</td>
754 <td class=
"paramkey"></td>
756 <td class=
"paramtype"><a class=
"el" href=
"union_w128___t.html">w128_t
</a> *
</td>
757 <td class=
"paramname"> <em>array
</em>,
</td>
760 <td class=
"paramkey"></td>
762 <td class=
"paramtype">int
</td>
763 <td class=
"paramname"> <em>size
</em></td><td> </td>
768 <td></td><td></td><td width=
"100%"><code> [inline, static]
</code></td>
775 This function fills the user-specified array with double precision floating point pseudorandom numbers of the IEEE
754 format.
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> </td><td>dsfmt state vector.
</td></tr>
780 <tr><td valign=
"top"></td><td valign=
"top"><em>array
</em> </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> </td><td>number of
128-bit pseudorandom numbers to be generated.
</td></tr>
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>
787 <p>Referenced by
<a class=
"el" href=
"d_s_f_m_t_8c-source.html#l00573">dsfmt_fill_array_open_close()
</a>.
</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">
796 <td class=
"memname">static void gen_rand_array_o0o1
</td>
798 <td class=
"paramtype"><a class=
"el" href=
"struct_d_s_f_m_t___t.html">dsfmt_t
</a> *
</td>
799 <td class=
"paramname"> <em>dsfmt
</em>,
</td>
802 <td class=
"paramkey"></td>
804 <td class=
"paramtype"><a class=
"el" href=
"union_w128___t.html">w128_t
</a> *
</td>
805 <td class=
"paramname"> <em>array
</em>,
</td>
808 <td class=
"paramkey"></td>
810 <td class=
"paramtype">int
</td>
811 <td class=
"paramname"> <em>size
</em></td><td> </td>
816 <td></td><td></td><td width=
"100%"><code> [inline, static]
</code></td>
823 This function fills the user-specified array with double precision floating point pseudorandom numbers of the IEEE
754 format.
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> </td><td>dsfmt state vector.
</td></tr>
828 <tr><td valign=
"top"></td><td valign=
"top"><em>array
</em> </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> </td><td>number of
128-bit pseudorandom numbers to be generated.
</td></tr>
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>
835 <p>Referenced by
<a class=
"el" href=
"d_s_f_m_t_8c-source.html#l00609">dsfmt_fill_array_open_open()
</a>.
</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">
844 <td class=
"memname">static int idxof
</td>
846 <td class=
"paramtype">int
</td>
847 <td class=
"paramname"> <em>i
</em> </td>
848 <td> )
</td>
849 <td width=
"100%"><code> [inline, static]
</code></td>
856 This function simulate a
32-bit array index overlapped to
64-bit array of LITTLE ENDIAN in BIG ENDIAN machine.
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>
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">
868 <td class=
"memname">static uint32_t ini_func1
</td>
870 <td class=
"paramtype">uint32_t
</td>
871 <td class=
"paramname"> <em>x
</em> </td>
872 <td> )
</td>
873 <td width=
"100%"><code> [inline, static]
</code></td>
880 This function represents a function used in the initialization by init_by_array.
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> </td><td>32-bit integer
</td></tr>
887 <dl class=
"return" compact
><dt><b>Returns:
</b></dt><dd>32-bit integer
</dd></dl>
889 <p>Referenced by
<a class=
"el" href=
"d_s_f_m_t_8c-source.html#l00656">dsfmt_chk_init_by_array()
</a>.
</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">
898 <td class=
"memname">static uint32_t ini_func2
</td>
900 <td class=
"paramtype">uint32_t
</td>
901 <td class=
"paramname"> <em>x
</em> </td>
902 <td> )
</td>
903 <td width=
"100%"><code> [inline, static]
</code></td>
910 This function represents a function used in the initialization by init_by_array.
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> </td><td>32-bit integer
</td></tr>
917 <dl class=
"return" compact
><dt><b>Returns:
</b></dt><dd>32-bit integer
</dd></dl>
919 <p>Referenced by
<a class=
"el" href=
"d_s_f_m_t_8c-source.html#l00656">dsfmt_chk_init_by_array()
</a>.
</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">
928 <td class=
"memname">static void initial_mask
</td>
930 <td class=
"paramtype"><a class=
"el" href=
"struct_d_s_f_m_t___t.html">dsfmt_t
</a> *
</td>
931 <td class=
"paramname"> <em>dsfmt
</em> </td>
932 <td> )
</td>
933 <td width=
"100%"><code> [static]
</code></td>
940 This function initializes the internal state array to fit the IEEE
754 format.
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> </td><td>dsfmt state vector.
</td></tr>
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>
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>
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">
959 <td class=
"memname">static void period_certification
</td>
961 <td class=
"paramtype"><a class=
"el" href=
"struct_d_s_f_m_t___t.html">dsfmt_t
</a> *
</td>
962 <td class=
"paramname"> <em>dsfmt
</em> </td>
963 <td> )
</td>
964 <td width=
"100%"><code> [static]
</code></td>
971 This function certificate the period of
2^{SFMT_MEXP}-
1.
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> </td><td>dsfmt state vector.
</td></tr>
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>
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>
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">
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>
998 dsfmt internal state vector
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>
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">
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>
1014 <div class=
"memdoc">
1017 dsfmt mexp for check
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>
1025 <hr size=
"1"><address style=
"text-align: right;"><small>Generated on Sat Apr
18 11:
08:
43 2009 for dSFMT by
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>