commons-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject svn commit: r997106 [8/9] - in /websites/production/commons/content/proper/commons-rng: ./ apidocs/ apidocs/org/apache/commons/rng/internal/source32/ apidocs/org/apache/commons/rng/internal/source64/ apidocs/org/apache/commons/rng/internal/util/ apidoc...
Date Sat, 10 Sep 2016 14:26:31 GMT
Modified: websites/production/commons/content/proper/commons-rng/team-list.html
==============================================================================
--- websites/production/commons/content/proper/commons-rng/team-list.html (original)
+++ websites/production/commons/content/proper/commons-rng/team-list.html Sat Sep 10 14:26:30 2016
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 02 September 2016
+ | Generated by Apache Maven Doxia at 10 September 2016
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20160902" />
+    <meta name="Date-Revision-yyyymmdd" content="20160910" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Rng &#x2013; Project Team</title>
 
@@ -40,7 +40,7 @@
           <a class="brand" href="http://commons.apache.org/proper/commons-rng/">Apache Commons Rng &trade;</a>
           <ul class="nav">      
                     
-            <li id="publishDate">Last Published: 02 September 2016</li>
+            <li id="publishDate">Last Published: 10 September 2016</li>
       <li class="divider">|</li> <li id="projectVersion">Version: 1.0-SNAPSHOT</li>
   </ul>
                     <div class="pull-right">  <ul class="nav">

Modified: websites/production/commons/content/proper/commons-rng/userguide/index.html
==============================================================================
--- websites/production/commons/content/proper/commons-rng/userguide/index.html (original)
+++ websites/production/commons/content/proper/commons-rng/userguide/index.html Sat Sep 10 14:26:30 2016
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 30 August 2016
+ | Generated by Apache Maven Doxia at 10 September 2016
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20160830" />
+    <meta name="Date-Revision-yyyymmdd" content="20160910" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Rng &#x2013; The Commons Rng User Guide - Table of Contents</title>
 
@@ -40,7 +40,7 @@
           <a class="brand" href="http://commons.apache.org/proper/commons-rng/">Apache Commons Rng &trade;</a>
           <ul class="nav">      
                     
-            <li id="publishDate">Last Published: 30 August 2016</li>
+            <li id="publishDate">Last Published: 10 September 2016</li>
       <li class="divider">|</li> <li id="projectVersion">Version: 1.0-SNAPSHOT</li>
   </ul>
                     <div class="pull-right">  <ul class="nav">

Modified: websites/production/commons/content/proper/commons-rng/userguide/rng.html
==============================================================================
--- websites/production/commons/content/proper/commons-rng/userguide/rng.html (original)
+++ websites/production/commons/content/proper/commons-rng/userguide/rng.html Sat Sep 10 14:26:30 2016
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 02 September 2016
+ | Generated by Apache Maven Doxia at 10 September 2016
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20160902" />
+    <meta name="Date-Revision-yyyymmdd" content="20160910" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Rng &#x2013; The Commons Rng User Guide</title>
 
@@ -40,7 +40,7 @@
           <a class="brand" href="http://commons.apache.org/proper/commons-rng/">Apache Commons Rng &trade;</a>
           <ul class="nav">      
                     
-            <li id="publishDate">Last Published: 02 September 2016</li>
+            <li id="publishDate">Last Published: 10 September 2016</li>
       <li class="divider">|</li> <li id="projectVersion">Version: 1.0-SNAPSHOT</li>
   </ul>
                     <div class="pull-right">  <ul class="nav">
@@ -332,7 +332,6 @@ RandomSource.restoreState(rngNew, stateN
 <ul>
 <li><tt>ProviderBuilder</tt>: contains methods for instantiating the concrete RNG implementations based on the source identifier; it also takes care of calling the appropriate classes for seed type conversion.</li>
 <li><tt>BaseProvider</tt>: base class for all concrete RNG implementations; it contains higher-level algorithms <tt>nextInt(int n)</tt> and <tt>nextLong(long n)</tt> common to all implementations.</li>
-<li><tt>StateSettable</tt>: interface to be implemented by concrete random sources.</li>
 <li><tt>org.apache.commons.rng.internal.util</tt>
 <ul>
 <li><tt>NumberFactory</tt>: contains utilities for interpreting and combining the output (<tt>int</tt> or <tt>long</tt>) of the underlying source of randomness into the requested output, i.e. one of the Java primitive types supported by <tt>UniformRandomProvider</tt>.</li>
@@ -356,216 +355,165 @@ RandomSource.restoreState(rngNew, stateN
 <li>CPU: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz</li>
 <li>Java runtime: 1.7.0_95-b00</li>
 <li>JVM: OpenJDK 64-Bit Server VM 24.95-b01</li></ul>
-<p>The following tables indicates the performance for generating</p>
+<p>The following tables indicate the performance (as measured by <a class="externalLink" href="http://openjdk.java.net/projects/code-tools/jmh/">JMH</a>) for generating</p>
 <ul>
 <li>a sequence of 32-bits integers (a.k.a. Java type <tt>int</tt>)</li>
 <li>a sequence of 64-bits integers (a.k.a. Java type <tt>long</tt>)</li>
 <li>a sequence of 64-bits floating point numbers (a.k.a. Java type <tt>double</tt>)</li></ul>
-<p>The first column is the RNG identifier (see <a href="../apidocs/org/apache/commons/rng/RandomSource.html">RandomSource</a>).</p>
-<p>Two independent benchmarking tools were used:</p>
-<ul>
-<li>Commons Math <tt>PerfTestUtils</tt></li>
-<li><a class="externalLink" href="http://openjdk.java.net/projects/code-tools/jmh/">JMH</a></li></ul>
-<p>The results of those tools are reported in second and third columns, respectively, where the value is the ratio of the performance of the implementation with respect to the corresponding performance of the JDK's <tt>java.util.Random</tt> class. In these tables, <i>lower</i> is <i>better</i>.</p>
+<p>The benchmark code is available in the &quot;src/test&quot; part of the source code repository (in class <tt>GenerationTestPerformance</tt>).</p>
+<p>The first column is the RNG identifier (see <a href="../apidocs/org/apache/commons/rng/RandomSource.html">RandomSource</a>); the performance value is the ratio of the (JMH) score with respect to the score of <tt>RandomSource.JDK</tt>.</p>
+<p>In these tables, <i>lower</i> is <i>better</i>.</p>
 <ul>
 <li>Generating <tt>int</tt> values
 <table border="1" class="bodyTable">
 <tr class="a">
 <th align="center">RNG identifier</th>
-<th align="left">Ratio (PerfTestUtils)</th>
-<th align="left">Ratio (JMH)</th></tr>
+<th align="left">Score ratio</th></tr>
 <tr class="b">
-<td align="center">JDK</td>
-<td align="left">1.21</td>
-<td align="left">1.000</td></tr>
+<td align="center">MWC_256</td>
+<td align="left">0.42168</td></tr>
+<tr class="a">
+<td align="center">SPLIT_MIX_64</td>
+<td align="left">0.42845</td></tr>
+<tr class="b">
+<td align="center">TWO_CMRES</td>
+<td align="left">0.46360</td></tr>
+<tr class="a">
+<td align="center">XOR_SHIFT_1024_S</td>
+<td align="left">0.48818</td></tr>
+<tr class="b">
+<td align="center">ISAAC</td>
+<td align="left">0.56263</td></tr>
+<tr class="a">
+<td align="center">KISS</td>
+<td align="left">0.56340</td></tr>
+<tr class="b">
+<td align="center">MT_64</td>
+<td align="left">0.62591</td></tr>
 <tr class="a">
 <td align="center">MT</td>
-<td align="left">1.19</td>
-<td align="left">0.639</td></tr>
+<td align="left">0.65198</td></tr>
 <tr class="b">
 <td align="center">WELL_512_A</td>
-<td align="left">1.33</td>
-<td align="left">0.740</td></tr>
+<td align="left">0.83364</td></tr>
 <tr class="a">
 <td align="center">WELL_1024_A</td>
-<td align="left">1.38</td>
-<td align="left">0.795</td></tr>
-<tr class="b">
-<td align="center">WELL_19937_A</td>
-<td align="left">1.47</td>
-<td align="left">1.039</td></tr>
-<tr class="a">
-<td align="center">WELL_19937_C</td>
-<td align="left">1.54</td>
-<td align="left">1.102</td></tr>
+<td align="left">0.88204</td></tr>
 <tr class="b">
 <td align="center">WELL_44497_A</td>
-<td align="left">1.53</td>
-<td align="left">1.187</td></tr>
+<td align="left">0.99618</td></tr>
 <tr class="a">
+<td align="center">JDK</td>
+<td align="left">1.00000</td></tr>
+<tr class="b">
 <td align="center">WELL_44497_B</td>
-<td align="left">1.59</td>
-<td align="left">1.114</td></tr>
+<td align="left">1.00641</td></tr>
+<tr class="a">
+<td align="center">WELL_19937_A</td>
+<td align="left">1.09770</td></tr>
 <tr class="b">
-<td align="center">ISAAC</td>
-<td align="left">1.30</td>
-<td align="left">0.610</td></tr>
+<td align="center">WELL_19937_C</td>
+<td align="left">1.13420</td></tr></table></li>
+<li>Generating <tt>long</tt> values
+<table border="1" class="bodyTable">
 <tr class="a">
-<td align="center">MT_64</td>
-<td align="left">1.31</td>
-<td align="left">0.734</td></tr>
+<th align="center">RNG identifier</th>
+<th align="left">Score ratio</th></tr>
 <tr class="b">
 <td align="center">SPLIT_MIX_64</td>
-<td align="left">1.00</td>
-<td align="left">0.361</td></tr>
+<td align="left">0.23505</td></tr>
 <tr class="a">
 <td align="center">XOR_SHIFT_1024_S</td>
-<td align="left">1.09</td>
-<td align="left">0.450</td></tr>
+<td align="left">0.26918</td></tr>
 <tr class="b">
 <td align="center">TWO_CMRES</td>
-<td align="left">1.14</td>
-<td align="left">0.464</td></tr>
+<td align="left">0.28069</td></tr>
 <tr class="a">
-<td align="center">MWC_256</td>
-<td align="left">????</td>
-<td align="left">????</td></tr>
+<td align="center">MT_64</td>
+<td align="left">0.34193</td></tr>
 <tr class="b">
-<td align="center">KISS</td>
-<td align="left">????</td>
-<td align="left">????</td></tr></table></li>
-<li>Generating <tt>long</tt> values
-<table border="1" class="bodyTable">
+<td align="center">MWC_256</td>
+<td align="left">0.40359</td></tr>
 <tr class="a">
-<th align="center">RNG identifier</th>
-<th align="left">Ratio (PerfTestUtils)</th>
-<th align="left">Ratio (JMH)</th></tr>
+<td align="center">KISS</td>
+<td align="left">0.55043</td></tr>
 <tr class="b">
-<td align="center">JDK</td>
-<td align="left">1.40</td>
-<td align="left">1.002</td></tr>
-<tr class="a">
 <td align="center">MT</td>
-<td align="left">0.85</td>
-<td align="left">0.569</td></tr>
+<td align="left">0.63092</td></tr>
+<tr class="a">
+<td align="center">ISAAC</td>
+<td align="left">0.63944</td></tr>
 <tr class="b">
 <td align="center">WELL_512_A</td>
-<td align="left">1.05</td>
-<td align="left">0.798</td></tr>
+<td align="left">0.65085</td></tr>
 <tr class="a">
 <td align="center">WELL_1024_A</td>
-<td align="left">1.08</td>
-<td align="left">0.873</td></tr>
+<td align="left">0.71561</td></tr>
 <tr class="b">
-<td align="center">WELL_19937_A</td>
-<td align="left">1.21</td>
-<td align="left">0.968</td></tr>
+<td align="center">JDK</td>
+<td align="left">1.00000</td></tr>
 <tr class="a">
-<td align="center">WELL_19937_C</td>
-<td align="left">1.27</td>
-<td align="left">1.020</td></tr>
+<td align="center">WELL_19937_A</td>
+<td align="left">1.03761</td></tr>
 <tr class="b">
 <td align="center">WELL_44497_A</td>
-<td align="left">1.26</td>
-<td align="left">1.103</td></tr>
+<td align="left">1.06495</td></tr>
 <tr class="a">
 <td align="center">WELL_44497_B</td>
-<td align="left">1.31</td>
-<td align="left">1.043</td></tr>
+<td align="left">1.14565</td></tr>
 <tr class="b">
-<td align="center">ISAAC</td>
-<td align="left">0.96</td>
-<td align="left">0.515</td></tr>
+<td align="center">WELL_19937_C</td>
+<td align="left">1.23338</td></tr></table></li>
+<li>Generating <tt>double</tt> values
+<table border="1" class="bodyTable">
 <tr class="a">
-<td align="center">MT_64</td>
-<td align="left">0.67</td>
-<td align="left">0.343</td></tr>
+<th align="center">RNG identifier</th>
+<th align="left">Score ratio</th></tr>
 <tr class="b">
 <td align="center">SPLIT_MIX_64</td>
-<td align="left">0.55</td>
-<td align="left">0.175</td></tr>
+<td align="left">0.28609</td></tr>
 <tr class="a">
 <td align="center">XOR_SHIFT_1024_S</td>
-<td align="left">0.59</td>
-<td align="left">0.207</td></tr>
+<td align="left">0.32866</td></tr>
 <tr class="b">
 <td align="center">TWO_CMRES</td>
-<td align="left">0.61</td>
-<td align="left">0.223</td></tr>
+<td align="left">0.34069</td></tr>
 <tr class="a">
 <td align="center">MWC_256</td>
-<td align="left">????</td>
-<td align="left">????</td></tr>
+<td align="left">0.39083</td></tr>
 <tr class="b">
-<td align="center">KISS</td>
-<td align="left">????</td>
-<td align="left">????</td></tr></table></li>
-<li>Generating <tt>double</tt> values
-<table border="1" class="bodyTable">
+<td align="center">MT_64</td>
+<td align="left">0.39368</td></tr>
 <tr class="a">
-<th align="center">RNG identifier</th>
-<th align="left">Ratio (PerfTestUtils)</th>
-<th align="left">Ratio (JMH)</th></tr>
+<td align="center">KISS</td>
+<td align="left">0.60581</td></tr>
 <tr class="b">
-<td align="center">JDK</td>
-<td align="left">1.15</td>
-<td align="left">1.001</td></tr>
+<td align="center">ISAAC</td>
+<td align="left">0.64429</td></tr>
 <tr class="a">
 <td align="center">MT</td>
-<td align="left">0.86</td>
-<td align="left">0.614</td></tr>
+<td align="left">0.67086</td></tr>
 <tr class="b">
-<td align="center">WELL_512_A</td>
-<td align="left">1.08</td>
-<td align="left">0.839</td></tr>
-<tr class="a">
 <td align="center">WELL_1024_A</td>
-<td align="left">1.11</td>
-<td align="left">0.899</td></tr>
-<tr class="b">
-<td align="center">WELL_19937_A</td>
-<td align="left">1.23</td>
-<td align="left">0.984</td></tr>
+<td align="left">0.73629</td></tr>
 <tr class="a">
-<td align="center">WELL_19937_C</td>
-<td align="left">1.29</td>
-<td align="left">1.069</td></tr>
-<tr class="b">
-<td align="center">WELL_44497_A</td>
-<td align="left">1.28</td>
-<td align="left">1.125</td></tr>
-<tr class="a">
-<td align="center">WELL_44497_B</td>
-<td align="left">1.33</td>
-<td align="left">1.093</td></tr>
-<tr class="b">
-<td align="center">ISAAC</td>
-<td align="left">0.98</td>
-<td align="left">0.583</td></tr>
-<tr class="a">
-<td align="center">MT_64</td>
-<td align="left">0.66</td>
-<td align="left">0.391</td></tr>
+<td align="center">WELL_512_A</td>
+<td align="left">0.78037</td></tr>
 <tr class="b">
-<td align="center">SPLIT_MIX_64</td>
-<td align="left">0.57</td>
-<td align="left">0.226</td></tr>
+<td align="center">JDK</td>
+<td align="left">1.00000</td></tr>
 <tr class="a">
-<td align="center">XOR_SHIFT_1024_S</td>
-<td align="left">0.59</td>
-<td align="left">0.262</td></tr>
+<td align="center">WELL_19937_A</td>
+<td align="left">1.11497</td></tr>
 <tr class="b">
-<td align="center">TWO_CMRES</td>
-<td align="left">0.60</td>
-<td align="left">0.284</td></tr>
+<td align="center">WELL_44497_A</td>
+<td align="left">1.13362</td></tr>
 <tr class="a">
-<td align="center">MWC_256</td>
-<td align="left">????</td>
-<td align="left">????</td></tr>
+<td align="center">WELL_19937_C</td>
+<td align="left">1.15334</td></tr>
 <tr class="b">
-<td align="center">KISS</td>
-<td align="left">????</td>
-<td align="left">????</td></tr></table></li></ul></div>
+<td align="center">WELL_44497_B</td>
+<td align="left">1.22613</td></tr></table></li></ul></div>
 <div class="section">
 <h2><a name="a4._Quality"></a>4. Quality</h2>
 <p>This section reports results of performing &quot;stress tests&quot; that aim at detecting failures of an implementation to produce sequences of numbers that follow a uniform distribution.</p>

Modified: websites/production/commons/content/proper/commons-rng/xref/org/apache/commons/rng/internal/source32/KISSRandom.html
==============================================================================
--- websites/production/commons/content/proper/commons-rng/xref/org/apache/commons/rng/internal/source32/KISSRandom.html (original)
+++ websites/production/commons/content/proper/commons-rng/xref/org/apache/commons/rng/internal/source32/KISSRandom.html Sat Sep 10 14:26:30 2016
@@ -25,118 +25,107 @@
 <a class="jxr_linenumber" name="L17" href="#L17">17</a>  <strong class="jxr_keyword">package</strong> org.apache.commons.rng.internal.source32;
 <a class="jxr_linenumber" name="L18" href="#L18">18</a>  
 <a class="jxr_linenumber" name="L19" href="#L19">19</a>  <strong class="jxr_keyword">import</strong> org.apache.commons.rng.internal.util.NumberFactory;
-<a class="jxr_linenumber" name="L20" href="#L20">20</a>  
-<a class="jxr_linenumber" name="L21" href="#L21">21</a>  <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L22" href="#L22">22</a>  <em class="jxr_javadoccomment"> * Port from Marsaglia's &lt;a href="<a href="http://www.cse.yorku.ca/~oz/marsaglia-rng.html" target="alexandria_uri">http://www.cse.yorku.ca/~oz/marsaglia-rng.html</a>"&gt;</em>
-<a class="jxr_linenumber" name="L23" href="#L23">23</a>  <em class="jxr_javadoccomment"> * "KISS" algorithm&lt;/a&gt;.</em>
-<a class="jxr_linenumber" name="L24" href="#L24">24</a>  <em class="jxr_javadoccomment"> * This version contains the correction referred to</em>
-<a class="jxr_linenumber" name="L25" href="#L25">25</a>  <em class="jxr_javadoccomment"> * &lt;a href="https://programmingpraxis.com/2010/10/05/george-marsaglias-random-number-generators/"&gt;here&lt;/a&gt;</em>
-<a class="jxr_linenumber" name="L26" href="#L26">26</a>  <em class="jxr_javadoccomment"> * in a reply to the original post.</em>
-<a class="jxr_linenumber" name="L27" href="#L27">27</a>  <em class="jxr_javadoccomment"> *</em>
-<a class="jxr_linenumber" name="L28" href="#L28">28</a>  <em class="jxr_javadoccomment"> * @since 1.0</em>
-<a class="jxr_linenumber" name="L29" href="#L29">29</a>  <em class="jxr_javadoccomment"> */</em>
-<a class="jxr_linenumber" name="L30" href="#L30">30</a>  <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../org/apache/commons/rng/internal/source32/KISSRandom.html">KISSRandom</a> <strong class="jxr_keyword">extends</strong> <a href="../../../../../../org/apache/commons/rng/internal/source32/IntProvider.html">IntProvider</a> {
-<a class="jxr_linenumber" name="L31" href="#L31">31</a>      <em class="jxr_javadoccomment">/** Size of the seed. */</em>
-<a class="jxr_linenumber" name="L32" href="#L32">32</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> SEED_SIZE = 4;
-<a class="jxr_linenumber" name="L33" href="#L33">33</a>      <em class="jxr_javadoccomment">/** State variable. */</em>
-<a class="jxr_linenumber" name="L34" href="#L34">34</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">int</strong> z;
-<a class="jxr_linenumber" name="L35" href="#L35">35</a>      <em class="jxr_javadoccomment">/** State variable. */</em>
-<a class="jxr_linenumber" name="L36" href="#L36">36</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">int</strong> w;
-<a class="jxr_linenumber" name="L37" href="#L37">37</a>      <em class="jxr_javadoccomment">/** State variable. */</em>
-<a class="jxr_linenumber" name="L38" href="#L38">38</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">int</strong> jsr;
-<a class="jxr_linenumber" name="L39" href="#L39">39</a>      <em class="jxr_javadoccomment">/** State variable. */</em>
-<a class="jxr_linenumber" name="L40" href="#L40">40</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">int</strong> jcong;
-<a class="jxr_linenumber" name="L41" href="#L41">41</a>  
-<a class="jxr_linenumber" name="L42" href="#L42">42</a>      <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L43" href="#L43">43</a>  <em class="jxr_javadoccomment">     * Creates a new instance.</em>
-<a class="jxr_linenumber" name="L44" href="#L44">44</a>  <em class="jxr_javadoccomment">     *</em>
-<a class="jxr_linenumber" name="L45" href="#L45">45</a>  <em class="jxr_javadoccomment">     * @param seed Seed.</em>
-<a class="jxr_linenumber" name="L46" href="#L46">46</a>  <em class="jxr_javadoccomment">     * If the length is larger than 4, only the first 4 elements will</em>
-<a class="jxr_linenumber" name="L47" href="#L47">47</a>  <em class="jxr_javadoccomment">     * be used; if smaller, the remaining elements will be automatically</em>
-<a class="jxr_linenumber" name="L48" href="#L48">48</a>  <em class="jxr_javadoccomment">     * set.</em>
-<a class="jxr_linenumber" name="L49" href="#L49">49</a>  <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L50" href="#L50">50</a>      <strong class="jxr_keyword">public</strong> <a href="../../../../../../org/apache/commons/rng/internal/source32/KISSRandom.html">KISSRandom</a>(<strong class="jxr_keyword">int</strong>[] seed) {
-<a class="jxr_linenumber" name="L51" href="#L51">51</a>          setSeedInternal(seed);
-<a class="jxr_linenumber" name="L52" href="#L52">52</a>      }
-<a class="jxr_linenumber" name="L53" href="#L53">53</a>  
-<a class="jxr_linenumber" name="L54" href="#L54">54</a>      <em class="jxr_javadoccomment">/** {@inheritDoc} */</em>
-<a class="jxr_linenumber" name="L55" href="#L55">55</a>      @Override
-<a class="jxr_linenumber" name="L56" href="#L56">56</a>      <strong class="jxr_keyword">protected</strong> byte[] getStateInternal() {
-<a class="jxr_linenumber" name="L57" href="#L57">57</a>          <strong class="jxr_keyword">return</strong> NumberFactory.makeByteArray(<strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">int</strong>[] { z, w, jsr, jcong });
-<a class="jxr_linenumber" name="L58" href="#L58">58</a>      }
-<a class="jxr_linenumber" name="L59" href="#L59">59</a>  
-<a class="jxr_linenumber" name="L60" href="#L60">60</a>      <em class="jxr_javadoccomment">/** {@inheritDoc} */</em>
-<a class="jxr_linenumber" name="L61" href="#L61">61</a>      @Override
-<a class="jxr_linenumber" name="L62" href="#L62">62</a>      <strong class="jxr_keyword">protected</strong> <strong class="jxr_keyword">void</strong> setStateInternal(byte[] s) {
-<a class="jxr_linenumber" name="L63" href="#L63">63</a>          checkStateSize(s, SEED_SIZE * 4);
-<a class="jxr_linenumber" name="L64" href="#L64">64</a>  
-<a class="jxr_linenumber" name="L65" href="#L65">65</a>          <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong>[] tmp = NumberFactory.makeIntArray(s);
-<a class="jxr_linenumber" name="L66" href="#L66">66</a>  
-<a class="jxr_linenumber" name="L67" href="#L67">67</a>          z = tmp[0];
-<a class="jxr_linenumber" name="L68" href="#L68">68</a>          w = tmp[1];
-<a class="jxr_linenumber" name="L69" href="#L69">69</a>          jsr = tmp[2];
-<a class="jxr_linenumber" name="L70" href="#L70">70</a>          jcong = tmp[3];
-<a class="jxr_linenumber" name="L71" href="#L71">71</a>      }
-<a class="jxr_linenumber" name="L72" href="#L72">72</a>  
-<a class="jxr_linenumber" name="L73" href="#L73">73</a>      <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L74" href="#L74">74</a>  <em class="jxr_javadoccomment">     * Seeds the RNG.</em>
-<a class="jxr_linenumber" name="L75" href="#L75">75</a>  <em class="jxr_javadoccomment">     *</em>
-<a class="jxr_linenumber" name="L76" href="#L76">76</a>  <em class="jxr_javadoccomment">     * @param seed Seed.</em>
-<a class="jxr_linenumber" name="L77" href="#L77">77</a>  <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L78" href="#L78">78</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">void</strong> setSeedInternal(<strong class="jxr_keyword">int</strong>[] seed) {
-<a class="jxr_linenumber" name="L79" href="#L79">79</a>          <em class="jxr_comment">// Reset the whole state of this RNG (i.e. the 4 state variables).</em>
-<a class="jxr_linenumber" name="L80" href="#L80">80</a>          <em class="jxr_comment">// Seeding procedure is not part of the reference code.</em>
-<a class="jxr_linenumber" name="L81" href="#L81">81</a>  
+<a class="jxr_linenumber" name="L20" href="#L20">20</a>  <strong class="jxr_keyword">import</strong> org.apache.commons.rng.internal.util.SeedFactory;
+<a class="jxr_linenumber" name="L21" href="#L21">21</a>  
+<a class="jxr_linenumber" name="L22" href="#L22">22</a>  <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L23" href="#L23">23</a>  <em class="jxr_javadoccomment"> * Port from Marsaglia's &lt;a href="<a href="http://www.cse.yorku.ca/~oz/marsaglia-rng.html" target="alexandria_uri">http://www.cse.yorku.ca/~oz/marsaglia-rng.html</a>"&gt;</em>
+<a class="jxr_linenumber" name="L24" href="#L24">24</a>  <em class="jxr_javadoccomment"> * "KISS" algorithm&lt;/a&gt;.</em>
+<a class="jxr_linenumber" name="L25" href="#L25">25</a>  <em class="jxr_javadoccomment"> * This version contains the correction referred to</em>
+<a class="jxr_linenumber" name="L26" href="#L26">26</a>  <em class="jxr_javadoccomment"> * &lt;a href="https://programmingpraxis.com/2010/10/05/george-marsaglias-random-number-generators/"&gt;here&lt;/a&gt;</em>
+<a class="jxr_linenumber" name="L27" href="#L27">27</a>  <em class="jxr_javadoccomment"> * in a reply to the original post.</em>
+<a class="jxr_linenumber" name="L28" href="#L28">28</a>  <em class="jxr_javadoccomment"> *</em>
+<a class="jxr_linenumber" name="L29" href="#L29">29</a>  <em class="jxr_javadoccomment"> * @since 1.0</em>
+<a class="jxr_linenumber" name="L30" href="#L30">30</a>  <em class="jxr_javadoccomment"> */</em>
+<a class="jxr_linenumber" name="L31" href="#L31">31</a>  <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../org/apache/commons/rng/internal/source32/KISSRandom.html">KISSRandom</a> <strong class="jxr_keyword">extends</strong> <a href="../../../../../../org/apache/commons/rng/internal/source32/IntProvider.html">IntProvider</a> {
+<a class="jxr_linenumber" name="L32" href="#L32">32</a>      <em class="jxr_javadoccomment">/** Size of the seed. */</em>
+<a class="jxr_linenumber" name="L33" href="#L33">33</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> SEED_SIZE = 4;
+<a class="jxr_linenumber" name="L34" href="#L34">34</a>      <em class="jxr_javadoccomment">/** State variable. */</em>
+<a class="jxr_linenumber" name="L35" href="#L35">35</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">int</strong> z;
+<a class="jxr_linenumber" name="L36" href="#L36">36</a>      <em class="jxr_javadoccomment">/** State variable. */</em>
+<a class="jxr_linenumber" name="L37" href="#L37">37</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">int</strong> w;
+<a class="jxr_linenumber" name="L38" href="#L38">38</a>      <em class="jxr_javadoccomment">/** State variable. */</em>
+<a class="jxr_linenumber" name="L39" href="#L39">39</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">int</strong> jsr;
+<a class="jxr_linenumber" name="L40" href="#L40">40</a>      <em class="jxr_javadoccomment">/** State variable. */</em>
+<a class="jxr_linenumber" name="L41" href="#L41">41</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">int</strong> jcong;
+<a class="jxr_linenumber" name="L42" href="#L42">42</a>  
+<a class="jxr_linenumber" name="L43" href="#L43">43</a>      <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L44" href="#L44">44</a>  <em class="jxr_javadoccomment">     * Creates a new instance.</em>
+<a class="jxr_linenumber" name="L45" href="#L45">45</a>  <em class="jxr_javadoccomment">     *</em>
+<a class="jxr_linenumber" name="L46" href="#L46">46</a>  <em class="jxr_javadoccomment">     * @param seed Seed.</em>
+<a class="jxr_linenumber" name="L47" href="#L47">47</a>  <em class="jxr_javadoccomment">     * If the length is larger than 4, only the first 4 elements will</em>
+<a class="jxr_linenumber" name="L48" href="#L48">48</a>  <em class="jxr_javadoccomment">     * be used; if smaller, the remaining elements will be automatically</em>
+<a class="jxr_linenumber" name="L49" href="#L49">49</a>  <em class="jxr_javadoccomment">     * set.</em>
+<a class="jxr_linenumber" name="L50" href="#L50">50</a>  <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L51" href="#L51">51</a>      <strong class="jxr_keyword">public</strong> <a href="../../../../../../org/apache/commons/rng/internal/source32/KISSRandom.html">KISSRandom</a>(<strong class="jxr_keyword">int</strong>[] seed) {
+<a class="jxr_linenumber" name="L52" href="#L52">52</a>          setSeedInternal(seed);
+<a class="jxr_linenumber" name="L53" href="#L53">53</a>      }
+<a class="jxr_linenumber" name="L54" href="#L54">54</a>  
+<a class="jxr_linenumber" name="L55" href="#L55">55</a>      <em class="jxr_javadoccomment">/** {@inheritDoc} */</em>
+<a class="jxr_linenumber" name="L56" href="#L56">56</a>      @Override
+<a class="jxr_linenumber" name="L57" href="#L57">57</a>      <strong class="jxr_keyword">protected</strong> byte[] getStateInternal() {
+<a class="jxr_linenumber" name="L58" href="#L58">58</a>          <strong class="jxr_keyword">return</strong> NumberFactory.makeByteArray(<strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">int</strong>[] { z, w, jsr, jcong });
+<a class="jxr_linenumber" name="L59" href="#L59">59</a>      }
+<a class="jxr_linenumber" name="L60" href="#L60">60</a>  
+<a class="jxr_linenumber" name="L61" href="#L61">61</a>      <em class="jxr_javadoccomment">/** {@inheritDoc} */</em>
+<a class="jxr_linenumber" name="L62" href="#L62">62</a>      @Override
+<a class="jxr_linenumber" name="L63" href="#L63">63</a>      <strong class="jxr_keyword">protected</strong> <strong class="jxr_keyword">void</strong> setStateInternal(byte[] s) {
+<a class="jxr_linenumber" name="L64" href="#L64">64</a>          checkStateSize(s, SEED_SIZE * 4);
+<a class="jxr_linenumber" name="L65" href="#L65">65</a>  
+<a class="jxr_linenumber" name="L66" href="#L66">66</a>          <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong>[] tmp = NumberFactory.makeIntArray(s);
+<a class="jxr_linenumber" name="L67" href="#L67">67</a>  
+<a class="jxr_linenumber" name="L68" href="#L68">68</a>          z = tmp[0];
+<a class="jxr_linenumber" name="L69" href="#L69">69</a>          w = tmp[1];
+<a class="jxr_linenumber" name="L70" href="#L70">70</a>          jsr = tmp[2];
+<a class="jxr_linenumber" name="L71" href="#L71">71</a>          jcong = tmp[3];
+<a class="jxr_linenumber" name="L72" href="#L72">72</a>      }
+<a class="jxr_linenumber" name="L73" href="#L73">73</a>  
+<a class="jxr_linenumber" name="L74" href="#L74">74</a>      <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L75" href="#L75">75</a>  <em class="jxr_javadoccomment">     * Seeds the RNG.</em>
+<a class="jxr_linenumber" name="L76" href="#L76">76</a>  <em class="jxr_javadoccomment">     *</em>
+<a class="jxr_linenumber" name="L77" href="#L77">77</a>  <em class="jxr_javadoccomment">     * @param seed Seed.</em>
+<a class="jxr_linenumber" name="L78" href="#L78">78</a>  <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L79" href="#L79">79</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">void</strong> setSeedInternal(<strong class="jxr_keyword">int</strong>[] seed) {
+<a class="jxr_linenumber" name="L80" href="#L80">80</a>          <em class="jxr_comment">// Reset the whole state of this RNG (i.e. the 4 state variables).</em>
+<a class="jxr_linenumber" name="L81" href="#L81">81</a>          <em class="jxr_comment">// Seeding procedure is not part of the reference code.</em>
 <a class="jxr_linenumber" name="L82" href="#L82">82</a>          <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong>[] tmp = <strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">int</strong>[SEED_SIZE];
-<a class="jxr_linenumber" name="L83" href="#L83">83</a>          System.arraycopy(seed, 0, tmp, 0, Math.min(seed.length, tmp.length));
+<a class="jxr_linenumber" name="L83" href="#L83">83</a>          SeedFactory.fillState(tmp, seed);
 <a class="jxr_linenumber" name="L84" href="#L84">84</a>  
-<a class="jxr_linenumber" name="L85" href="#L85">85</a>          <strong class="jxr_keyword">if</strong> (seed.length &lt; SEED_SIZE) {
-<a class="jxr_linenumber" name="L86" href="#L86">86</a>              <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = seed.length; i &lt; SEED_SIZE; i++) {
-<a class="jxr_linenumber" name="L87" href="#L87">87</a>                  tmp[i] = 26021969 * i;
-<a class="jxr_linenumber" name="L88" href="#L88">88</a>              }
-<a class="jxr_linenumber" name="L89" href="#L89">89</a>              <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = SEED_SIZE - 1; i &gt; seed.length; i--) {
-<a class="jxr_linenumber" name="L90" href="#L90">90</a>                  tmp[i] ^= tmp[SEED_SIZE - i - 1];
-<a class="jxr_linenumber" name="L91" href="#L91">91</a>              }
-<a class="jxr_linenumber" name="L92" href="#L92">92</a>  
-<a class="jxr_linenumber" name="L93" href="#L93">93</a>              tmp[seed.length] = 0x80000000; <em class="jxr_comment">// Ensuring non-zero initial array.</em>
-<a class="jxr_linenumber" name="L94" href="#L94">94</a>          }
-<a class="jxr_linenumber" name="L95" href="#L95">95</a>  
-<a class="jxr_linenumber" name="L96" href="#L96">96</a>          z = tmp[0];
-<a class="jxr_linenumber" name="L97" href="#L97">97</a>          w = tmp[1];
-<a class="jxr_linenumber" name="L98" href="#L98">98</a>          jsr = tmp[2];
-<a class="jxr_linenumber" name="L99" href="#L99">99</a>          jcong = tmp[3];
-<a class="jxr_linenumber" name="L100" href="#L100">100</a>     }
-<a class="jxr_linenumber" name="L101" href="#L101">101</a> 
-<a class="jxr_linenumber" name="L102" href="#L102">102</a>     <em class="jxr_javadoccomment">/** {@inheritDoc} */</em>
-<a class="jxr_linenumber" name="L103" href="#L103">103</a>     @Override
-<a class="jxr_linenumber" name="L104" href="#L104">104</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">int</strong> next() {
-<a class="jxr_linenumber" name="L105" href="#L105">105</a>         z = computeNew(36969, z);
-<a class="jxr_linenumber" name="L106" href="#L106">106</a>         w = computeNew(18000, w);
-<a class="jxr_linenumber" name="L107" href="#L107">107</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> mwc = (z &lt;&lt; 16) + w;
+<a class="jxr_linenumber" name="L85" href="#L85">85</a>          z = tmp[0];
+<a class="jxr_linenumber" name="L86" href="#L86">86</a>          w = tmp[1];
+<a class="jxr_linenumber" name="L87" href="#L87">87</a>          jsr = tmp[2];
+<a class="jxr_linenumber" name="L88" href="#L88">88</a>          jcong = tmp[3];
+<a class="jxr_linenumber" name="L89" href="#L89">89</a>      }
+<a class="jxr_linenumber" name="L90" href="#L90">90</a>  
+<a class="jxr_linenumber" name="L91" href="#L91">91</a>      <em class="jxr_javadoccomment">/** {@inheritDoc} */</em>
+<a class="jxr_linenumber" name="L92" href="#L92">92</a>      @Override
+<a class="jxr_linenumber" name="L93" href="#L93">93</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">int</strong> next() {
+<a class="jxr_linenumber" name="L94" href="#L94">94</a>          z = computeNew(36969, z);
+<a class="jxr_linenumber" name="L95" href="#L95">95</a>          w = computeNew(18000, w);
+<a class="jxr_linenumber" name="L96" href="#L96">96</a>          <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> mwc = (z &lt;&lt; 16) + w;
+<a class="jxr_linenumber" name="L97" href="#L97">97</a>  
+<a class="jxr_linenumber" name="L98" href="#L98">98</a>          <em class="jxr_comment">// Cf. correction mentioned in the reply to the original post:</em>
+<a class="jxr_linenumber" name="L99" href="#L99">99</a>          <em class="jxr_comment">//   https://programmingpraxis.com/2010/10/05/george-marsaglias-random-number-generators/</em>
+<a class="jxr_linenumber" name="L100" href="#L100">100</a>         jsr ^= jsr &lt;&lt; 13;
+<a class="jxr_linenumber" name="L101" href="#L101">101</a>         jsr ^= jsr &gt;&gt;&gt; 17;
+<a class="jxr_linenumber" name="L102" href="#L102">102</a>         jsr ^= jsr &lt;&lt; 5;
+<a class="jxr_linenumber" name="L103" href="#L103">103</a> 
+<a class="jxr_linenumber" name="L104" href="#L104">104</a>         jcong = 69069 * jcong + 1234567;
+<a class="jxr_linenumber" name="L105" href="#L105">105</a> 
+<a class="jxr_linenumber" name="L106" href="#L106">106</a>         <strong class="jxr_keyword">return</strong> (mwc ^ jcong) + jsr;
+<a class="jxr_linenumber" name="L107" href="#L107">107</a>     }
 <a class="jxr_linenumber" name="L108" href="#L108">108</a> 
-<a class="jxr_linenumber" name="L109" href="#L109">109</a>         <em class="jxr_comment">// Cf. correction mentioned in the reply to the original post:</em>
-<a class="jxr_linenumber" name="L110" href="#L110">110</a>         <em class="jxr_comment">//   https://programmingpraxis.com/2010/10/05/george-marsaglias-random-number-generators/</em>
-<a class="jxr_linenumber" name="L111" href="#L111">111</a>         jsr ^= jsr &lt;&lt; 13;
-<a class="jxr_linenumber" name="L112" href="#L112">112</a>         jsr ^= jsr &gt;&gt;&gt; 17;
-<a class="jxr_linenumber" name="L113" href="#L113">113</a>         jsr ^= jsr &lt;&lt; 5;
-<a class="jxr_linenumber" name="L114" href="#L114">114</a> 
-<a class="jxr_linenumber" name="L115" href="#L115">115</a>         jcong = 69069 * jcong + 1234567;
-<a class="jxr_linenumber" name="L116" href="#L116">116</a> 
-<a class="jxr_linenumber" name="L117" href="#L117">117</a>         <strong class="jxr_keyword">return</strong> (mwc ^ jcong) + jsr;
-<a class="jxr_linenumber" name="L118" href="#L118">118</a>     }
-<a class="jxr_linenumber" name="L119" href="#L119">119</a> 
-<a class="jxr_linenumber" name="L120" href="#L120">120</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L121" href="#L121">121</a> <em class="jxr_javadoccomment">     * Compute new value.</em>
-<a class="jxr_linenumber" name="L122" href="#L122">122</a> <em class="jxr_javadoccomment">     *</em>
-<a class="jxr_linenumber" name="L123" href="#L123">123</a> <em class="jxr_javadoccomment">     * @param mult Multiplier.</em>
-<a class="jxr_linenumber" name="L124" href="#L124">124</a> <em class="jxr_javadoccomment">     * @param previous Previous value.</em>
-<a class="jxr_linenumber" name="L125" href="#L125">125</a> <em class="jxr_javadoccomment">     * @return new value.</em>
-<a class="jxr_linenumber" name="L126" href="#L126">126</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L127" href="#L127">127</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">int</strong> computeNew(<strong class="jxr_keyword">int</strong> mult,
-<a class="jxr_linenumber" name="L128" href="#L128">128</a>                            <strong class="jxr_keyword">int</strong> previous) {
-<a class="jxr_linenumber" name="L129" href="#L129">129</a>         <strong class="jxr_keyword">return</strong> mult * (previous &amp; 65535) + (previous &gt;&gt;&gt; 16);
-<a class="jxr_linenumber" name="L130" href="#L130">130</a>     }
-<a class="jxr_linenumber" name="L131" href="#L131">131</a> }
+<a class="jxr_linenumber" name="L109" href="#L109">109</a>     <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L110" href="#L110">110</a> <em class="jxr_javadoccomment">     * Compute new value.</em>
+<a class="jxr_linenumber" name="L111" href="#L111">111</a> <em class="jxr_javadoccomment">     *</em>
+<a class="jxr_linenumber" name="L112" href="#L112">112</a> <em class="jxr_javadoccomment">     * @param mult Multiplier.</em>
+<a class="jxr_linenumber" name="L113" href="#L113">113</a> <em class="jxr_javadoccomment">     * @param previous Previous value.</em>
+<a class="jxr_linenumber" name="L114" href="#L114">114</a> <em class="jxr_javadoccomment">     * @return new value.</em>
+<a class="jxr_linenumber" name="L115" href="#L115">115</a> <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L116" href="#L116">116</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">int</strong> computeNew(<strong class="jxr_keyword">int</strong> mult,
+<a class="jxr_linenumber" name="L117" href="#L117">117</a>                            <strong class="jxr_keyword">int</strong> previous) {
+<a class="jxr_linenumber" name="L118" href="#L118">118</a>         <strong class="jxr_keyword">return</strong> mult * (previous &amp; 65535) + (previous &gt;&gt;&gt; 16);
+<a class="jxr_linenumber" name="L119" href="#L119">119</a>     }
+<a class="jxr_linenumber" name="L120" href="#L120">120</a> }
 </pre>
 <hr/>
 <div id="footer">Copyright &#169; 2016 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</div>

Modified: websites/production/commons/content/proper/commons-rng/xref/org/apache/commons/rng/internal/source32/MersenneTwister.html
==============================================================================
--- websites/production/commons/content/proper/commons-rng/xref/org/apache/commons/rng/internal/source32/MersenneTwister.html (original)
+++ websites/production/commons/content/proper/commons-rng/xref/org/apache/commons/rng/internal/source32/MersenneTwister.html Sat Sep 10 14:26:30 2016
@@ -148,95 +148,107 @@
 <a class="jxr_linenumber" name="L140" href="#L140">140</a> <em class="jxr_javadoccomment">     * @param seed Initial seed.</em>
 <a class="jxr_linenumber" name="L141" href="#L141">141</a> <em class="jxr_javadoccomment">     */</em>
 <a class="jxr_linenumber" name="L142" href="#L142">142</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">void</strong> setSeedInternal(<strong class="jxr_keyword">int</strong>[] seed) {
-<a class="jxr_linenumber" name="L143" href="#L143">143</a>         <strong class="jxr_keyword">if</strong> (seed.length == 0) {
-<a class="jxr_linenumber" name="L144" href="#L144">144</a>             <em class="jxr_comment">// Accept empty seed.</em>
-<a class="jxr_linenumber" name="L145" href="#L145">145</a>             seed = <strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">int</strong>[1];
-<a class="jxr_linenumber" name="L146" href="#L146">146</a>         }
-<a class="jxr_linenumber" name="L147" href="#L147">147</a> 
-<a class="jxr_linenumber" name="L148" href="#L148">148</a>         initState(19650218);
-<a class="jxr_linenumber" name="L149" href="#L149">149</a>         <strong class="jxr_keyword">int</strong> i = 1;
-<a class="jxr_linenumber" name="L150" href="#L150">150</a>         <strong class="jxr_keyword">int</strong> j = 0;
-<a class="jxr_linenumber" name="L151" href="#L151">151</a> 
-<a class="jxr_linenumber" name="L152" href="#L152">152</a>         <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> k = Math.max(N, seed.length); k != 0; k--) {
-<a class="jxr_linenumber" name="L153" href="#L153">153</a>             <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">long</strong> l0 = (mt[i] &amp; LOWER_MASK_LONG) | ((mt[i] &lt; 0) ? UPPER_MASK_LONG : 0);
-<a class="jxr_linenumber" name="L154" href="#L154">154</a>             <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">long</strong> l1 = (mt[i - 1] &amp; LOWER_MASK_LONG) | ((mt[i - 1] &lt; 0) ? UPPER_MASK_LONG : 0);
-<a class="jxr_linenumber" name="L155" href="#L155">155</a>             <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">long</strong> l = (l0 ^ ((l1 ^ (l1 &gt;&gt; 30)) * 1664525l)) + seed[j] + j; <em class="jxr_comment">// non linear</em>
-<a class="jxr_linenumber" name="L156" href="#L156">156</a>             mt[i] = (<strong class="jxr_keyword">int</strong>) (l &amp; INT_MASK_LONG);
-<a class="jxr_linenumber" name="L157" href="#L157">157</a>             i++; j++;
-<a class="jxr_linenumber" name="L158" href="#L158">158</a>             <strong class="jxr_keyword">if</strong> (i &gt;= N) {
-<a class="jxr_linenumber" name="L159" href="#L159">159</a>                 mt[0] = mt[N - 1];
-<a class="jxr_linenumber" name="L160" href="#L160">160</a>                 i = 1;
-<a class="jxr_linenumber" name="L161" href="#L161">161</a>             }
-<a class="jxr_linenumber" name="L162" href="#L162">162</a>             <strong class="jxr_keyword">if</strong> (j &gt;= seed.length) {
-<a class="jxr_linenumber" name="L163" href="#L163">163</a>                 j = 0;
-<a class="jxr_linenumber" name="L164" href="#L164">164</a>             }
-<a class="jxr_linenumber" name="L165" href="#L165">165</a>         }
+<a class="jxr_linenumber" name="L143" href="#L143">143</a>         fillStateMersenneTwister(mt, seed);
+<a class="jxr_linenumber" name="L144" href="#L144">144</a> 
+<a class="jxr_linenumber" name="L145" href="#L145">145</a>         <em class="jxr_comment">// Initial index.</em>
+<a class="jxr_linenumber" name="L146" href="#L146">146</a>         mti = N;
+<a class="jxr_linenumber" name="L147" href="#L147">147</a>     }
+<a class="jxr_linenumber" name="L148" href="#L148">148</a> 
+<a class="jxr_linenumber" name="L149" href="#L149">149</a>     <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L150" href="#L150">150</a> <em class="jxr_javadoccomment">     * Utility for wholly filling a {@code state} array with non-zero</em>
+<a class="jxr_linenumber" name="L151" href="#L151">151</a> <em class="jxr_javadoccomment">     * bytes, even if the {@code seed} has a smaller size.</em>
+<a class="jxr_linenumber" name="L152" href="#L152">152</a> <em class="jxr_javadoccomment">     * The procedure is the one defined by the standard implementation</em>
+<a class="jxr_linenumber" name="L153" href="#L153">153</a> <em class="jxr_javadoccomment">     * of the algorithm.</em>
+<a class="jxr_linenumber" name="L154" href="#L154">154</a> <em class="jxr_javadoccomment">     *</em>
+<a class="jxr_linenumber" name="L155" href="#L155">155</a> <em class="jxr_javadoccomment">     * @param state State to be filled (must be allocated).</em>
+<a class="jxr_linenumber" name="L156" href="#L156">156</a> <em class="jxr_javadoccomment">     * @param seed Seed (cannot be {@code null}).</em>
+<a class="jxr_linenumber" name="L157" href="#L157">157</a> <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L158" href="#L158">158</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">void</strong> fillStateMersenneTwister(<strong class="jxr_keyword">int</strong>[] state,
+<a class="jxr_linenumber" name="L159" href="#L159">159</a>                                                  <strong class="jxr_keyword">int</strong>[] seed) {
+<a class="jxr_linenumber" name="L160" href="#L160">160</a>         <strong class="jxr_keyword">if</strong> (seed.length == 0) {
+<a class="jxr_linenumber" name="L161" href="#L161">161</a>             <em class="jxr_comment">// Accept empty seed.</em>
+<a class="jxr_linenumber" name="L162" href="#L162">162</a>             seed = <strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">int</strong>[1];
+<a class="jxr_linenumber" name="L163" href="#L163">163</a>         }
+<a class="jxr_linenumber" name="L164" href="#L164">164</a> 
+<a class="jxr_linenumber" name="L165" href="#L165">165</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> stateSize = state.length;
 <a class="jxr_linenumber" name="L166" href="#L166">166</a> 
-<a class="jxr_linenumber" name="L167" href="#L167">167</a>         <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> k = N - 1; k != 0; k--) {
-<a class="jxr_linenumber" name="L168" href="#L168">168</a>             <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">long</strong> l0 = (mt[i] &amp; LOWER_MASK_LONG) | ((mt[i] &lt; 0) ? UPPER_MASK_LONG : 0);
-<a class="jxr_linenumber" name="L169" href="#L169">169</a>             <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">long</strong> l1 = (mt[i - 1] &amp; LOWER_MASK_LONG) | ((mt[i - 1] &lt; 0) ? UPPER_MASK_LONG : 0);
-<a class="jxr_linenumber" name="L170" href="#L170">170</a>             <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">long</strong> l  = (l0 ^ ((l1 ^ (l1 &gt;&gt; 30)) * 1566083941l)) - i; <em class="jxr_comment">// non linear</em>
-<a class="jxr_linenumber" name="L171" href="#L171">171</a>             mt[i] = (<strong class="jxr_keyword">int</strong>) (l &amp; INT_MASK_LONG);
-<a class="jxr_linenumber" name="L172" href="#L172">172</a>             i++;
-<a class="jxr_linenumber" name="L173" href="#L173">173</a>             <strong class="jxr_keyword">if</strong> (i &gt;= N) {
-<a class="jxr_linenumber" name="L174" href="#L174">174</a>                 mt[0] = mt[N - 1];
-<a class="jxr_linenumber" name="L175" href="#L175">175</a>                 i = 1;
-<a class="jxr_linenumber" name="L176" href="#L176">176</a>             }
-<a class="jxr_linenumber" name="L177" href="#L177">177</a>         }
-<a class="jxr_linenumber" name="L178" href="#L178">178</a> 
-<a class="jxr_linenumber" name="L179" href="#L179">179</a>         mt[0] = UPPER_MASK; <em class="jxr_comment">// MSB is 1; assuring non-zero initial array</em>
-<a class="jxr_linenumber" name="L180" href="#L180">180</a>     }
-<a class="jxr_linenumber" name="L181" href="#L181">181</a> 
-<a class="jxr_linenumber" name="L182" href="#L182">182</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L183" href="#L183">183</a> <em class="jxr_javadoccomment">     * Initialize the internal state of this instance.</em>
-<a class="jxr_linenumber" name="L184" href="#L184">184</a> <em class="jxr_javadoccomment">     *</em>
-<a class="jxr_linenumber" name="L185" href="#L185">185</a> <em class="jxr_javadoccomment">     * @param seed Seed.</em>
-<a class="jxr_linenumber" name="L186" href="#L186">186</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L187" href="#L187">187</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">void</strong> initState(<strong class="jxr_keyword">int</strong> seed) {
-<a class="jxr_linenumber" name="L188" href="#L188">188</a>         <strong class="jxr_keyword">long</strong> longMT = seed &amp; INT_MASK_LONG;
-<a class="jxr_linenumber" name="L189" href="#L189">189</a>         mt[0] = (<strong class="jxr_keyword">int</strong>) longMT;
-<a class="jxr_linenumber" name="L190" href="#L190">190</a>         <strong class="jxr_keyword">for</strong> (mti = 1; mti &lt; N; ++mti) {
-<a class="jxr_linenumber" name="L191" href="#L191">191</a>             longMT = (1812433253L * (longMT ^ (longMT &gt;&gt; 30)) + mti) &amp; INT_MASK_LONG;
-<a class="jxr_linenumber" name="L192" href="#L192">192</a>             mt[mti] = (<strong class="jxr_keyword">int</strong>) longMT;
-<a class="jxr_linenumber" name="L193" href="#L193">193</a>         }
-<a class="jxr_linenumber" name="L194" href="#L194">194</a>     }
-<a class="jxr_linenumber" name="L195" href="#L195">195</a> 
-<a class="jxr_linenumber" name="L196" href="#L196">196</a>     <em class="jxr_javadoccomment">/** {@inheritDoc} */</em>
-<a class="jxr_linenumber" name="L197" href="#L197">197</a>     @Override
-<a class="jxr_linenumber" name="L198" href="#L198">198</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">int</strong> next() {
-<a class="jxr_linenumber" name="L199" href="#L199">199</a>         <strong class="jxr_keyword">int</strong> y;
-<a class="jxr_linenumber" name="L200" href="#L200">200</a> 
-<a class="jxr_linenumber" name="L201" href="#L201">201</a>         <strong class="jxr_keyword">if</strong> (mti &gt;= N) { <em class="jxr_comment">// Generate N words at one time.</em>
-<a class="jxr_linenumber" name="L202" href="#L202">202</a>             <strong class="jxr_keyword">int</strong> mtNext = mt[0];
-<a class="jxr_linenumber" name="L203" href="#L203">203</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> k = 0; k &lt; N - M; ++k) {
-<a class="jxr_linenumber" name="L204" href="#L204">204</a>                 <strong class="jxr_keyword">int</strong> mtCurr = mtNext;
-<a class="jxr_linenumber" name="L205" href="#L205">205</a>                 mtNext = mt[k + 1];
-<a class="jxr_linenumber" name="L206" href="#L206">206</a>                 y = (mtCurr &amp; UPPER_MASK) | (mtNext &amp; LOWER_MASK);
-<a class="jxr_linenumber" name="L207" href="#L207">207</a>                 mt[k] = mt[k + M] ^ (y &gt;&gt;&gt; 1) ^ MAG01[y &amp; 1];
-<a class="jxr_linenumber" name="L208" href="#L208">208</a>             }
-<a class="jxr_linenumber" name="L209" href="#L209">209</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> k = N - M; k &lt; N - 1; ++k) {
-<a class="jxr_linenumber" name="L210" href="#L210">210</a>                 <strong class="jxr_keyword">int</strong> mtCurr = mtNext;
-<a class="jxr_linenumber" name="L211" href="#L211">211</a>                 mtNext = mt[k + 1];
-<a class="jxr_linenumber" name="L212" href="#L212">212</a>                 y = (mtCurr &amp; UPPER_MASK) | (mtNext &amp; LOWER_MASK);
-<a class="jxr_linenumber" name="L213" href="#L213">213</a>                 mt[k] = mt[k + (M - N)] ^ (y &gt;&gt;&gt; 1) ^ MAG01[y &amp; 1];
-<a class="jxr_linenumber" name="L214" href="#L214">214</a>             }
-<a class="jxr_linenumber" name="L215" href="#L215">215</a>             y = (mtNext &amp; UPPER_MASK) | (mt[0] &amp; LOWER_MASK);
-<a class="jxr_linenumber" name="L216" href="#L216">216</a>             mt[N - 1] = mt[M - 1] ^ (y &gt;&gt;&gt; 1) ^ MAG01[y &amp; 1];
-<a class="jxr_linenumber" name="L217" href="#L217">217</a> 
-<a class="jxr_linenumber" name="L218" href="#L218">218</a>             mti = 0;
-<a class="jxr_linenumber" name="L219" href="#L219">219</a>         }
-<a class="jxr_linenumber" name="L220" href="#L220">220</a> 
-<a class="jxr_linenumber" name="L221" href="#L221">221</a>         y = mt[mti++];
-<a class="jxr_linenumber" name="L222" href="#L222">222</a> 
-<a class="jxr_linenumber" name="L223" href="#L223">223</a>         <em class="jxr_comment">// Tempering.</em>
-<a class="jxr_linenumber" name="L224" href="#L224">224</a>         y ^=  y &gt;&gt;&gt; 11;
-<a class="jxr_linenumber" name="L225" href="#L225">225</a>         y ^= (y &lt;&lt; 7) &amp; 0x9d2c5680;
-<a class="jxr_linenumber" name="L226" href="#L226">226</a>         y ^= (y &lt;&lt; 15) &amp; 0xefc60000;
-<a class="jxr_linenumber" name="L227" href="#L227">227</a>         y ^=  y &gt;&gt;&gt; 18;
-<a class="jxr_linenumber" name="L228" href="#L228">228</a> 
-<a class="jxr_linenumber" name="L229" href="#L229">229</a>         <strong class="jxr_keyword">return</strong> y;
-<a class="jxr_linenumber" name="L230" href="#L230">230</a>     }
-<a class="jxr_linenumber" name="L231" href="#L231">231</a> }
+<a class="jxr_linenumber" name="L167" href="#L167">167</a>         <strong class="jxr_keyword">long</strong> mt = 19650218 &amp; INT_MASK_LONG;
+<a class="jxr_linenumber" name="L168" href="#L168">168</a>         state[0] = (<strong class="jxr_keyword">int</strong>) mt;
+<a class="jxr_linenumber" name="L169" href="#L169">169</a>         <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 1; i &lt; stateSize; i++) {
+<a class="jxr_linenumber" name="L170" href="#L170">170</a>             mt = (1812433253L * (mt ^ (mt &gt;&gt; 30)) + i) &amp; INT_MASK_LONG;
+<a class="jxr_linenumber" name="L171" href="#L171">171</a>             state[i] = (<strong class="jxr_keyword">int</strong>) mt;
+<a class="jxr_linenumber" name="L172" href="#L172">172</a>         }
+<a class="jxr_linenumber" name="L173" href="#L173">173</a> 
+<a class="jxr_linenumber" name="L174" href="#L174">174</a>         <strong class="jxr_keyword">int</strong> i = 1;
+<a class="jxr_linenumber" name="L175" href="#L175">175</a>         <strong class="jxr_keyword">int</strong> j = 0;
+<a class="jxr_linenumber" name="L176" href="#L176">176</a> 
+<a class="jxr_linenumber" name="L177" href="#L177">177</a>         <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> k = Math.max(stateSize, seed.length); k &gt; 0; k--) {
+<a class="jxr_linenumber" name="L178" href="#L178">178</a>             <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">long</strong> a = (state[i] &amp; LOWER_MASK_LONG) | ((state[i] &lt; 0) ? UPPER_MASK_LONG : 0);
+<a class="jxr_linenumber" name="L179" href="#L179">179</a>             <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">long</strong> b = (state[i - 1] &amp; LOWER_MASK_LONG) | ((state[i - 1] &lt; 0) ? UPPER_MASK_LONG : 0);
+<a class="jxr_linenumber" name="L180" href="#L180">180</a>             <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">long</strong> c = (a ^ ((b ^ (b &gt;&gt; 30)) * 1664525L)) + seed[j] + j; <em class="jxr_comment">// Non linear.</em>
+<a class="jxr_linenumber" name="L181" href="#L181">181</a>             state[i] = (<strong class="jxr_keyword">int</strong>) (c &amp; INT_MASK_LONG);
+<a class="jxr_linenumber" name="L182" href="#L182">182</a>             i++;
+<a class="jxr_linenumber" name="L183" href="#L183">183</a>             j++;
+<a class="jxr_linenumber" name="L184" href="#L184">184</a>             <strong class="jxr_keyword">if</strong> (i &gt;= stateSize) {
+<a class="jxr_linenumber" name="L185" href="#L185">185</a>                 state[0] = state[stateSize - 1];
+<a class="jxr_linenumber" name="L186" href="#L186">186</a>                 i = 1;
+<a class="jxr_linenumber" name="L187" href="#L187">187</a>             }
+<a class="jxr_linenumber" name="L188" href="#L188">188</a>             <strong class="jxr_keyword">if</strong> (j &gt;= seed.length) {
+<a class="jxr_linenumber" name="L189" href="#L189">189</a>                 j = 0;
+<a class="jxr_linenumber" name="L190" href="#L190">190</a>             }
+<a class="jxr_linenumber" name="L191" href="#L191">191</a>         }
+<a class="jxr_linenumber" name="L192" href="#L192">192</a> 
+<a class="jxr_linenumber" name="L193" href="#L193">193</a>         <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> k = stateSize - 1; k &gt; 0; k--) {
+<a class="jxr_linenumber" name="L194" href="#L194">194</a>             <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">long</strong> a = (state[i] &amp; LOWER_MASK_LONG) | ((state[i] &lt; 0) ? UPPER_MASK_LONG : 0);
+<a class="jxr_linenumber" name="L195" href="#L195">195</a>             <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">long</strong> b = (state[i - 1] &amp; LOWER_MASK_LONG) | ((state[i - 1] &lt; 0) ? UPPER_MASK_LONG : 0);
+<a class="jxr_linenumber" name="L196" href="#L196">196</a>             <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">long</strong> c = (a ^ ((b ^ (b &gt;&gt; 30)) * 1566083941L)) - i; <em class="jxr_comment">// Non linear.</em>
+<a class="jxr_linenumber" name="L197" href="#L197">197</a>             state[i] = (<strong class="jxr_keyword">int</strong>) (c &amp; INT_MASK_LONG);
+<a class="jxr_linenumber" name="L198" href="#L198">198</a>             i++;
+<a class="jxr_linenumber" name="L199" href="#L199">199</a>             <strong class="jxr_keyword">if</strong> (i &gt;= stateSize) {
+<a class="jxr_linenumber" name="L200" href="#L200">200</a>                 state[0] = state[stateSize - 1];
+<a class="jxr_linenumber" name="L201" href="#L201">201</a>                 i = 1;
+<a class="jxr_linenumber" name="L202" href="#L202">202</a>             }
+<a class="jxr_linenumber" name="L203" href="#L203">203</a>         }
+<a class="jxr_linenumber" name="L204" href="#L204">204</a> 
+<a class="jxr_linenumber" name="L205" href="#L205">205</a>         state[0] = (<strong class="jxr_keyword">int</strong>) UPPER_MASK_LONG; <em class="jxr_comment">// MSB is 1, ensuring non-zero initial array.</em>
+<a class="jxr_linenumber" name="L206" href="#L206">206</a>     }
+<a class="jxr_linenumber" name="L207" href="#L207">207</a> 
+<a class="jxr_linenumber" name="L208" href="#L208">208</a>     <em class="jxr_javadoccomment">/** {@inheritDoc} */</em>
+<a class="jxr_linenumber" name="L209" href="#L209">209</a>     @Override
+<a class="jxr_linenumber" name="L210" href="#L210">210</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">int</strong> next() {
+<a class="jxr_linenumber" name="L211" href="#L211">211</a>         <strong class="jxr_keyword">int</strong> y;
+<a class="jxr_linenumber" name="L212" href="#L212">212</a> 
+<a class="jxr_linenumber" name="L213" href="#L213">213</a>         <strong class="jxr_keyword">if</strong> (mti &gt;= N) { <em class="jxr_comment">// Generate N words at one time.</em>
+<a class="jxr_linenumber" name="L214" href="#L214">214</a>             <strong class="jxr_keyword">int</strong> mtNext = mt[0];
+<a class="jxr_linenumber" name="L215" href="#L215">215</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> k = 0; k &lt; N - M; ++k) {
+<a class="jxr_linenumber" name="L216" href="#L216">216</a>                 <strong class="jxr_keyword">int</strong> mtCurr = mtNext;
+<a class="jxr_linenumber" name="L217" href="#L217">217</a>                 mtNext = mt[k + 1];
+<a class="jxr_linenumber" name="L218" href="#L218">218</a>                 y = (mtCurr &amp; UPPER_MASK) | (mtNext &amp; LOWER_MASK);
+<a class="jxr_linenumber" name="L219" href="#L219">219</a>                 mt[k] = mt[k + M] ^ (y &gt;&gt;&gt; 1) ^ MAG01[y &amp; 1];
+<a class="jxr_linenumber" name="L220" href="#L220">220</a>             }
+<a class="jxr_linenumber" name="L221" href="#L221">221</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> k = N - M; k &lt; N - 1; ++k) {
+<a class="jxr_linenumber" name="L222" href="#L222">222</a>                 <strong class="jxr_keyword">int</strong> mtCurr = mtNext;
+<a class="jxr_linenumber" name="L223" href="#L223">223</a>                 mtNext = mt[k + 1];
+<a class="jxr_linenumber" name="L224" href="#L224">224</a>                 y = (mtCurr &amp; UPPER_MASK) | (mtNext &amp; LOWER_MASK);
+<a class="jxr_linenumber" name="L225" href="#L225">225</a>                 mt[k] = mt[k + (M - N)] ^ (y &gt;&gt;&gt; 1) ^ MAG01[y &amp; 1];
+<a class="jxr_linenumber" name="L226" href="#L226">226</a>             }
+<a class="jxr_linenumber" name="L227" href="#L227">227</a>             y = (mtNext &amp; UPPER_MASK) | (mt[0] &amp; LOWER_MASK);
+<a class="jxr_linenumber" name="L228" href="#L228">228</a>             mt[N - 1] = mt[M - 1] ^ (y &gt;&gt;&gt; 1) ^ MAG01[y &amp; 1];
+<a class="jxr_linenumber" name="L229" href="#L229">229</a> 
+<a class="jxr_linenumber" name="L230" href="#L230">230</a>             mti = 0;
+<a class="jxr_linenumber" name="L231" href="#L231">231</a>         }
+<a class="jxr_linenumber" name="L232" href="#L232">232</a> 
+<a class="jxr_linenumber" name="L233" href="#L233">233</a>         y = mt[mti++];
+<a class="jxr_linenumber" name="L234" href="#L234">234</a> 
+<a class="jxr_linenumber" name="L235" href="#L235">235</a>         <em class="jxr_comment">// Tempering.</em>
+<a class="jxr_linenumber" name="L236" href="#L236">236</a>         y ^=  y &gt;&gt;&gt; 11;
+<a class="jxr_linenumber" name="L237" href="#L237">237</a>         y ^= (y &lt;&lt; 7) &amp; 0x9d2c5680;
+<a class="jxr_linenumber" name="L238" href="#L238">238</a>         y ^= (y &lt;&lt; 15) &amp; 0xefc60000;
+<a class="jxr_linenumber" name="L239" href="#L239">239</a>         y ^=  y &gt;&gt;&gt; 18;
+<a class="jxr_linenumber" name="L240" href="#L240">240</a> 
+<a class="jxr_linenumber" name="L241" href="#L241">241</a>         <strong class="jxr_keyword">return</strong> y;
+<a class="jxr_linenumber" name="L242" href="#L242">242</a>     }
+<a class="jxr_linenumber" name="L243" href="#L243">243</a> }
 </pre>
 <hr/>
 <div id="footer">Copyright &#169; 2016 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</div>



Mime
View raw message