http://git-wip-us.apache.org/repos/asf/commons-rng/blob/d1b3113a/commons-rng-core/site-content/.svn/pristine/2a/2a35ed6377a27ca5de3433921fa2795054a15a1b.svn-base ---------------------------------------------------------------------- diff --git a/commons-rng-core/site-content/.svn/pristine/2a/2a35ed6377a27ca5de3433921fa2795054a15a1b.svn-base b/commons-rng-core/site-content/.svn/pristine/2a/2a35ed6377a27ca5de3433921fa2795054a15a1b.svn-base new file mode 100644 index 0000000..fd0dfcf --- /dev/null +++ b/commons-rng-core/site-content/.svn/pristine/2a/2a35ed6377a27ca5de3433921fa2795054a15a1b.svn-base @@ -0,0 +1,129 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head><meta http-equiv="content-type" content="text/html; charset=UTF-8" /> +<title>UniformRandomProvider xref</title> +<link type="text/css" rel="stylesheet" href="../../../../stylesheet.css" /> +</head> +<body> +<div id="overview"><a href="../../../../../apidocs/org/apache/commons/rng/UniformRandomProvider.html">View Javadoc</a></div><pre> +<a class="jxr_linenumber" name="L1" href="#L1">1</a> <em class="jxr_comment">/*</em> +<a class="jxr_linenumber" name="L2" href="#L2">2</a> <em class="jxr_comment"> * Licensed to the Apache Software Foundation (ASF) under one or more</em> +<a class="jxr_linenumber" name="L3" href="#L3">3</a> <em class="jxr_comment"> * contributor license agreements. See the NOTICE file distributed with</em> +<a class="jxr_linenumber" name="L4" href="#L4">4</a> <em class="jxr_comment"> * this work for additional information regarding copyright ownership.</em> +<a class="jxr_linenumber" name="L5" href="#L5">5</a> <em class="jxr_comment"> * The ASF licenses this file to You under the Apache License, Version 2.0</em> +<a class="jxr_linenumber" name="L6" href="#L6">6</a> <em class="jxr_comment"> * (the "License"); you may not use this file except in compliance with</em> +<a class="jxr_linenumber" name="L7" href="#L7">7</a> <em class="jxr_comment"> * the License. You may obtain a copy of the License at</em> +<a class="jxr_linenumber" name="L8" href="#L8">8</a> <em class="jxr_comment"> *</em> +<a class="jxr_linenumber" name="L9" href="#L9">9</a> <em class="jxr_comment"> * <a href="http://www.apache.org/licenses/LICENSE-2." target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.</a>0</em> +<a class="jxr_linenumber" name="L10" href="#L10">10</a> <em class="jxr_comment"> *</em> +<a class="jxr_linenumber" name="L11" href="#L11">11</a> <em class="jxr_comment"> * Unless required by applicable law or agreed to in writing, software</em> +<a class="jxr_linenumber" name="L12" href="#L12">12</a> <em class="jxr_comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em> +<a class="jxr_linenumber" name="L13" href="#L13">13</a> <em class="jxr_comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em> +<a class="jxr_linenumber" name="L14" href="#L14">14</a> <em class="jxr_comment"> * See the License for the specific language governing permissions and</em> +<a class="jxr_linenumber" name="L15" href="#L15">15</a> <em class="jxr_comment"> * limitations under the License.</em> +<a class="jxr_linenumber" name="L16" href="#L16">16</a> <em class="jxr_comment"> */</em> +<a class="jxr_linenumber" name="L17" href="#L17">17</a> <strong class="jxr_keyword">package</strong> org.apache.commons.rng; +<a class="jxr_linenumber" name="L18" href="#L18">18</a> +<a class="jxr_linenumber" name="L19" href="#L19">19</a> <em class="jxr_javadoccomment">/**</em> +<a class="jxr_linenumber" name="L20" href="#L20">20</a> <em class="jxr_javadoccomment"> * Applies to generators of random number sequences that follow a uniform</em> +<a class="jxr_linenumber" name="L21" href="#L21">21</a> <em class="jxr_javadoccomment"> * distribution.</em> +<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"> * @since 1.0</em> +<a class="jxr_linenumber" name="L24" href="#L24">24</a> <em class="jxr_javadoccomment"> */</em> +<a class="jxr_linenumber" name="L25" href="#L25">25</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">interface</strong> <a href="../../../../org/apache/commons/rng/UniformRandomProvider.html">UniformRandomProvider</a> { +<a class="jxr_linenumber" name="L26" href="#L26">26</a> <em class="jxr_javadoccomment">/**</em> +<a class="jxr_linenumber" name="L27" href="#L27">27</a> <em class="jxr_javadoccomment"> * Generates {@code byte} values and places them into a user-supplied array.</em> +<a class="jxr_linenumber" name="L28" href="#L28">28</a> <em class="jxr_javadoccomment"> * <p></em> +<a class="jxr_linenumber" name="L29" href="#L29">29</a> <em class="jxr_javadoccomment"> * The number of random bytes produced is equal to the length of the</em> +<a class="jxr_linenumber" name="L30" href="#L30">30</a> <em class="jxr_javadoccomment"> * the byte array.</em> +<a class="jxr_linenumber" name="L31" href="#L31">31</a> <em class="jxr_javadoccomment"> * </p></em> +<a class="jxr_linenumber" name="L32" href="#L32">32</a> <em class="jxr_javadoccomment"> *</em> +<a class="jxr_linenumber" name="L33" href="#L33">33</a> <em class="jxr_javadoccomment"> * @param bytes Byte array in which to put the random bytes.</em> +<a class="jxr_linenumber" name="L34" href="#L34">34</a> <em class="jxr_javadoccomment"> * Cannot be {@code null}.</em> +<a class="jxr_linenumber" name="L35" href="#L35">35</a> <em class="jxr_javadoccomment"> */</em> +<a class="jxr_linenumber" name="L36" href="#L36">36</a> <strong class="jxr_keyword">void</strong> nextBytes(byte[] bytes); +<a class="jxr_linenumber" name="L37" href="#L37">37</a> +<a class="jxr_linenumber" name="L38" href="#L38">38</a> <em class="jxr_javadoccomment">/**</em> +<a class="jxr_linenumber" name="L39" href="#L39">39</a> <em class="jxr_javadoccomment"> * Generates {@code byte} values and places them into a user-supplied array.</em> +<a class="jxr_linenumber" name="L40" href="#L40">40</a> <em class="jxr_javadoccomment"> *</em> +<a class="jxr_linenumber" name="L41" href="#L41">41</a> <em class="jxr_javadoccomment"> * <p></em> +<a class="jxr_linenumber" name="L42" href="#L42">42</a> <em class="jxr_javadoccomment"> * The array is filled with bytes extracted from random integers.</em> +<a class="jxr_linenumber" name="L43" href="#L43">43</a> <em class="jxr_javadoccomment"> * This implies that the number of random bytes generated may be larger than</em> +<a class="jxr_linenumber" name="L44" href="#L44">44</a> <em class="jxr_javadoccomment"> * the length of the byte array.</em> +<a class="jxr_linenumber" name="L45" href="#L45">45</a> <em class="jxr_javadoccomment"> * </p></em> +<a class="jxr_linenumber" name="L46" href="#L46">46</a> <em class="jxr_javadoccomment"> *</em> +<a class="jxr_linenumber" name="L47" href="#L47">47</a> <em class="jxr_javadoccomment"> * @param bytes Array in which to put the generated bytes.</em> +<a class="jxr_linenumber" name="L48" href="#L48">48</a> <em class="jxr_javadoccomment"> * Cannot be {@code null}.</em> +<a class="jxr_linenumber" name="L49" href="#L49">49</a> <em class="jxr_javadoccomment"> * @param start Index at which to start inserting the generated bytes.</em> +<a class="jxr_linenumber" name="L50" href="#L50">50</a> <em class="jxr_javadoccomment"> * @param len Number of bytes to insert.</em> +<a class="jxr_linenumber" name="L51" href="#L51">51</a> <em class="jxr_javadoccomment"> * @throws IndexOutOfBoundsException if {@code start < 0} or</em> +<a class="jxr_linenumber" name="L52" href="#L52">52</a> <em class="jxr_javadoccomment"> * {@code start >= bytes.length}.</em> +<a class="jxr_linenumber" name="L53" href="#L53">53</a> <em class="jxr_javadoccomment"> * @throws IndexOutOfBoundsException if {@code len < 0} or</em> +<a class="jxr_linenumber" name="L54" href="#L54">54</a> <em class="jxr_javadoccomment"> * {@code len > bytes.length - start}.</em> +<a class="jxr_linenumber" name="L55" href="#L55">55</a> <em class="jxr_javadoccomment"> */</em> +<a class="jxr_linenumber" name="L56" href="#L56">56</a> <strong class="jxr_keyword">void</strong> nextBytes(byte[] bytes, +<a class="jxr_linenumber" name="L57" href="#L57">57</a> <strong class="jxr_keyword">int</strong> start, +<a class="jxr_linenumber" name="L58" href="#L58">58</a> <strong class="jxr_keyword">int</strong> len); +<a class="jxr_linenumber" name="L59" href="#L59">59</a> +<a class="jxr_linenumber" name="L60" href="#L60">60</a> <em class="jxr_javadoccomment">/**</em> +<a class="jxr_linenumber" name="L61" href="#L61">61</a> <em class="jxr_javadoccomment"> * Generates an {@code int} value.</em> +<a class="jxr_linenumber" name="L62" href="#L62">62</a> <em class="jxr_javadoccomment"> *</em> +<a class="jxr_linenumber" name="L63" href="#L63">63</a> <em class="jxr_javadoccomment"> * @return the next random value.</em> +<a class="jxr_linenumber" name="L64" href="#L64">64</a> <em class="jxr_javadoccomment"> */</em> +<a class="jxr_linenumber" name="L65" href="#L65">65</a> <strong class="jxr_keyword">int</strong> nextInt(); +<a class="jxr_linenumber" name="L66" href="#L66">66</a> +<a class="jxr_linenumber" name="L67" href="#L67">67</a> <em class="jxr_javadoccomment">/**</em> +<a class="jxr_linenumber" name="L68" href="#L68">68</a> <em class="jxr_javadoccomment"> * Generates an {@code int} value between 0 (inclusive) and the</em> +<a class="jxr_linenumber" name="L69" href="#L69">69</a> <em class="jxr_javadoccomment"> * specified value (exclusive).</em> +<a class="jxr_linenumber" name="L70" href="#L70">70</a> <em class="jxr_javadoccomment"> *</em> +<a class="jxr_linenumber" name="L71" href="#L71">71</a> <em class="jxr_javadoccomment"> * @param n Bound on the random number to be returned. Must be positive.</em> +<a class="jxr_linenumber" name="L72" href="#L72">72</a> <em class="jxr_javadoccomment"> * @return a random {@code int} value between 0 (inclusive) and n</em> +<a class="jxr_linenumber" name="L73" href="#L73">73</a> <em class="jxr_javadoccomment"> * (exclusive).</em> +<a class="jxr_linenumber" name="L74" href="#L74">74</a> <em class="jxr_javadoccomment"> * @throws IllegalArgumentException if {@code n} is negative.</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> <strong class="jxr_keyword">int</strong> nextInt(<strong class="jxr_keyword">int</strong> n); +<a class="jxr_linenumber" name="L77" href="#L77">77</a> +<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> <em class="jxr_javadoccomment"> * Generates a {@code long} value.</em> +<a class="jxr_linenumber" name="L80" href="#L80">80</a> <em class="jxr_javadoccomment"> *</em> +<a class="jxr_linenumber" name="L81" href="#L81">81</a> <em class="jxr_javadoccomment"> * @return the next random value.</em> +<a class="jxr_linenumber" name="L82" href="#L82">82</a> <em class="jxr_javadoccomment"> */</em> +<a class="jxr_linenumber" name="L83" href="#L83">83</a> <strong class="jxr_keyword">long</strong> nextLong(); +<a class="jxr_linenumber" name="L84" href="#L84">84</a> +<a class="jxr_linenumber" name="L85" href="#L85">85</a> <em class="jxr_javadoccomment">/**</em> +<a class="jxr_linenumber" name="L86" href="#L86">86</a> <em class="jxr_javadoccomment"> * Generates a {@code long} value between 0 (inclusive) and the specified</em> +<a class="jxr_linenumber" name="L87" href="#L87">87</a> <em class="jxr_javadoccomment"> * value (exclusive).</em> +<a class="jxr_linenumber" name="L88" href="#L88">88</a> <em class="jxr_javadoccomment"> *</em> +<a class="jxr_linenumber" name="L89" href="#L89">89</a> <em class="jxr_javadoccomment"> * @param n Bound on the random number to be returned. Must be positive.</em> +<a class="jxr_linenumber" name="L90" href="#L90">90</a> <em class="jxr_javadoccomment"> * @return a random {@code long} value between 0 (inclusive) and n</em> +<a class="jxr_linenumber" name="L91" href="#L91">91</a> <em class="jxr_javadoccomment"> * (exclusive).</em> +<a class="jxr_linenumber" name="L92" href="#L92">92</a> <em class="jxr_javadoccomment"> * @throws IllegalArgumentException if {@code n} is negative.</em> +<a class="jxr_linenumber" name="L93" href="#L93">93</a> <em class="jxr_javadoccomment"> */</em> +<a class="jxr_linenumber" name="L94" href="#L94">94</a> <strong class="jxr_keyword">long</strong> nextLong(<strong class="jxr_keyword">long</strong> n); +<a class="jxr_linenumber" name="L95" href="#L95">95</a> +<a class="jxr_linenumber" name="L96" href="#L96">96</a> <em class="jxr_javadoccomment">/**</em> +<a class="jxr_linenumber" name="L97" href="#L97">97</a> <em class="jxr_javadoccomment"> * Generates a {@code boolean} value.</em> +<a class="jxr_linenumber" name="L98" href="#L98">98</a> <em class="jxr_javadoccomment"> *</em> +<a class="jxr_linenumber" name="L99" href="#L99">99</a> <em class="jxr_javadoccomment"> * @return the next random value.</em> +<a class="jxr_linenumber" name="L100" href="#L100">100</a> <em class="jxr_javadoccomment"> */</em> +<a class="jxr_linenumber" name="L101" href="#L101">101</a> <strong class="jxr_keyword">boolean</strong> nextBoolean(); +<a class="jxr_linenumber" name="L102" href="#L102">102</a> +<a class="jxr_linenumber" name="L103" href="#L103">103</a> <em class="jxr_javadoccomment">/**</em> +<a class="jxr_linenumber" name="L104" href="#L104">104</a> <em class="jxr_javadoccomment"> * Generates a {@code float} value between 0 and 1.</em> +<a class="jxr_linenumber" name="L105" href="#L105">105</a> <em class="jxr_javadoccomment"> *</em> +<a class="jxr_linenumber" name="L106" href="#L106">106</a> <em class="jxr_javadoccomment"> * @return the next random value between 0 and 1.</em> +<a class="jxr_linenumber" name="L107" href="#L107">107</a> <em class="jxr_javadoccomment"> */</em> +<a class="jxr_linenumber" name="L108" href="#L108">108</a> <strong class="jxr_keyword">float</strong> nextFloat(); +<a class="jxr_linenumber" name="L109" href="#L109">109</a> +<a class="jxr_linenumber" name="L110" href="#L110">110</a> <em class="jxr_javadoccomment">/**</em> +<a class="jxr_linenumber" name="L111" href="#L111">111</a> <em class="jxr_javadoccomment"> * Generates a {@code double} value between 0 and 1.</em> +<a class="jxr_linenumber" name="L112" href="#L112">112</a> <em class="jxr_javadoccomment"> *</em> +<a class="jxr_linenumber" name="L113" href="#L113">113</a> <em class="jxr_javadoccomment"> * @return the next random value between 0 and 1.</em> +<a class="jxr_linenumber" name="L114" href="#L114">114</a> <em class="jxr_javadoccomment"> */</em> +<a class="jxr_linenumber" name="L115" href="#L115">115</a> <strong class="jxr_keyword">double</strong> nextDouble(); +<a class="jxr_linenumber" name="L116" href="#L116">116</a> } +</pre> +<hr/> +<div id="footer">Copyright © 2016 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</div> +</body> +</html> \ No newline at end of file
http://git-wip-us.apache.org/repos/asf/commons-rng/blob/d1b3113a/commons-rng-core/site-content/.svn/pristine/2a/2a874757bd6fbee794b2ca82aef5e70551b96d48.svn-base ---------------------------------------------------------------------- diff --git a/commons-rng-core/site-content/.svn/pristine/2a/2a874757bd6fbee794b2ca82aef5e70551b96d48.svn-base b/commons-rng-core/site-content/.svn/pristine/2a/2a874757bd6fbee794b2ca82aef5e70551b96d48.svn-base new file mode 100644 index 0000000..56c06e8 --- /dev/null +++ b/commons-rng-core/site-content/.svn/pristine/2a/2a874757bd6fbee794b2ca82aef5e70551b96d48.svn-base @@ -0,0 +1,381 @@ +<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../.resources/report.css" type="text/css"/><link rel="shortcut icon" href="../.resources/report.gif" type="image/gif"/><title>ProviderBuilder.java</title><link rel="stylesheet" href="../.resources/prettify.css" type="text/css"/><script type="text/javascript" src="../.resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../.sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons Rng</a> > <a href="index.source.html" class="el_package">org.apache.commons.rng.internal</a> > <span class="el_source">ProviderBuilder.java</span> </div><h1>ProviderBuilder.java</h1><pre class="source lang-java linenums">/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.commons.rng.internal; + +import java.util.Arrays; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; + +import org.apache.commons.rng.UniformRandomProvider; +import org.apache.commons.rng.internal.util.SeedFactory; +import org.apache.commons.rng.internal.util.NoOpConverter; +import org.apache.commons.rng.internal.util.Int2Long; +import org.apache.commons.rng.internal.util.Long2Int; +import org.apache.commons.rng.internal.util.Long2IntArray; +import org.apache.commons.rng.internal.util.Long2LongArray; +import org.apache.commons.rng.internal.util.IntArray2LongArray; +import org.apache.commons.rng.internal.util.LongArray2IntArray; +import org.apache.commons.rng.internal.util.LongArray2Long; +import org.apache.commons.rng.internal.util.IntArray2Int; +import org.apache.commons.rng.internal.util.ByteArray2IntArray; +import org.apache.commons.rng.internal.util.ByteArray2LongArray; +import org.apache.commons.rng.internal.util.SeedConverter; +import org.apache.commons.rng.internal.util.SeedConverterComposer; +import org.apache.commons.rng.internal.source32.JDKRandom; +import org.apache.commons.rng.internal.source32.Well512a; +import org.apache.commons.rng.internal.source32.Well1024a; +import org.apache.commons.rng.internal.source32.Well19937a; +import org.apache.commons.rng.internal.source32.Well19937c; +import org.apache.commons.rng.internal.source32.Well44497a; +import org.apache.commons.rng.internal.source32.Well44497b; +import org.apache.commons.rng.internal.source32.ISAACRandom; +import org.apache.commons.rng.internal.source32.MersenneTwister; +import org.apache.commons.rng.internal.source32.MultiplyWithCarry256; +import org.apache.commons.rng.internal.source32.KISSRandom; +import org.apache.commons.rng.internal.source64.SplitMix64; +import org.apache.commons.rng.internal.source64.XorShift1024Star; +import org.apache.commons.rng.internal.source64.TwoCmres; +import org.apache.commons.rng.internal.source64.MersenneTwister64; + +/** + * RNG builder. + * <p> + * It uses reflection to find the factory method of the RNG implementation, + * and performs seed type conversions. + * </p> + */ +public class ProviderBuilder { + /** Error message. */ + private static final String INTERNAL_ERROR_MSG = "Internal error: Please file a bug report"; + /** Length of the seed array (for random seed). */ + private static final int RANDOM_SEED_ARRAY_SIZE = 128; + /** Seed converter. */ +<span class="fc" id="L71"> private static final Long2Int LONG_TO_INT = new Long2Int();</span> + /** Seed converter. */ +<span class="fc" id="L73"> private static final Int2Long INT_TO_LONG = new Int2Long();</span> + /** Seed converter. */ +<span class="fc" id="L75"> private static final Long2IntArray LONG_TO_INT_ARRAY = new Long2IntArray(RANDOM_SEED_ARRAY_SIZE);</span> + /** Seed converter. */ +<span class="fc" id="L77"> private static final Long2LongArray LONG_TO_LONG_ARRAY = new Long2LongArray(RANDOM_SEED_ARRAY_SIZE);</span> + /** Seed converter. */ +<span class="fc" id="L79"> private static final LongArray2Long LONG_ARRAY_TO_LONG = new LongArray2Long();</span> + /** Seed converter. */ +<span class="fc" id="L81"> private static final IntArray2Int INT_ARRAY_TO_INT = new IntArray2Int();</span> + /** Seed converter. */ +<span class="fc" id="L83"> private static final LongArray2IntArray LONG_ARRAY_TO_INT_ARRAY = new LongArray2IntArray();</span> + /** Seed converter. */ +<span class="fc" id="L85"> private static final IntArray2LongArray INT_ARRAY_TO_LONG_ARRAY = new IntArray2LongArray();</span> + /** Seed converter. */ +<span class="fc" id="L87"> private static final ByteArray2IntArray BYTE_ARRAY_TO_INT_ARRAY = new ByteArray2IntArray();</span> + /** Seed converter. */ +<span class="fc" id="L89"> private static final ByteArray2LongArray BYTE_ARRAY_TO_LONG_ARRAY = new ByteArray2LongArray();</span> + /** Map to convert "Integer" seeds. */ +<span class="fc" id="L91"> private static final Map<Class<?>, SeedConverter<Integer,?>> CONV_INT =</span> + new HashMap<Class<?>, SeedConverter<Integer,?>>(); + /** Map to convert "int[]" seeds. */ +<span class="fc" id="L94"> private static final Map<Class<?>, SeedConverter<int[],?>> CONV_INT_ARRAY =</span> + new HashMap<Class<?>, SeedConverter<int[],?>>(); + /** Map to convert "Long" seeds. */ +<span class="fc" id="L97"> private static final Map<Class<?>, SeedConverter<Long,?>> CONV_LONG =</span> + new HashMap<Class<?>, SeedConverter<Long,?>>(); + /** Map to convert "long[]" seeds. */ +<span class="fc" id="L100"> private static final Map<Class<?>, SeedConverter<long[],?>> CONV_LONG_ARRAY =</span> + new HashMap<Class<?>, SeedConverter<long[],?>>(); + /** Map to convert "byte[]" seeds. */ +<span class="fc" id="L103"> private static final Map<Class<?>, SeedConverter<byte[],?>> CONV_BYTE_ARRAY =</span> + new HashMap<Class<?>, SeedConverter<byte[],?>>(); + + static { + // Input seed type is "Long". + // Key is the implementation's "native" seed type. +<span class="fc" id="L109"> CONV_LONG.put(Integer.class, LONG_TO_INT);</span> +<span class="fc" id="L110"> CONV_LONG.put(Long.class, new NoOpConverter<Long>());</span> +<span class="fc" id="L111"> CONV_LONG.put(int[].class, LONG_TO_INT_ARRAY);</span> +<span class="fc" id="L112"> CONV_LONG.put(long[].class, LONG_TO_LONG_ARRAY);</span> + + // Input seed type is "Integer". + // Key is the implementation's "native" seed type. +<span class="fc" id="L116"> CONV_INT.put(Integer.class, new NoOpConverter<Integer>());</span> +<span class="fc" id="L117"> CONV_INT.put(Long.class, INT_TO_LONG);</span> +<span class="fc" id="L118"> CONV_INT.put(int[].class, new SeedConverterComposer<Integer,Long,int[]>(INT_TO_LONG, LONG_TO_INT_ARRAY));</span> +<span class="fc" id="L119"> CONV_INT.put(long[].class, new SeedConverterComposer<Integer,Long,long[]>(INT_TO_LONG, LONG_TO_LONG_ARRAY));</span> + + // Input seed type is "int[]". + // Key is the implementation's "native" seed type. +<span class="fc" id="L123"> CONV_INT_ARRAY.put(Integer.class, INT_ARRAY_TO_INT);</span> +<span class="fc" id="L124"> CONV_INT_ARRAY.put(Long.class, new SeedConverterComposer<int[],Integer,Long>(INT_ARRAY_TO_INT, INT_TO_LONG));</span> +<span class="fc" id="L125"> CONV_INT_ARRAY.put(int[].class, new NoOpConverter<int[]>());</span> +<span class="fc" id="L126"> CONV_INT_ARRAY.put(long[].class, INT_ARRAY_TO_LONG_ARRAY);</span> + + // Input seed type is "long[]". + // Key is the implementation's "native" seed type. +<span class="fc" id="L130"> CONV_LONG_ARRAY.put(Integer.class, new SeedConverterComposer<long[],Long,Integer>(LONG_ARRAY_TO_LONG, LONG_TO_INT));</span> +<span class="fc" id="L131"> CONV_LONG_ARRAY.put(Long.class, LONG_ARRAY_TO_LONG);</span> +<span class="fc" id="L132"> CONV_LONG_ARRAY.put(int[].class, LONG_ARRAY_TO_INT_ARRAY);</span> +<span class="fc" id="L133"> CONV_LONG_ARRAY.put(long[].class, new NoOpConverter<long[]>());</span> + + // Input seed type is "byte[]". + // Key is the implementation's "native" seed type. +<span class="fc" id="L137"> CONV_BYTE_ARRAY.put(Integer.class, new SeedConverterComposer<byte[],int[],Integer>(BYTE_ARRAY_TO_INT_ARRAY, INT_ARRAY_TO_INT));</span> +<span class="fc" id="L138"> CONV_BYTE_ARRAY.put(Long.class, new SeedConverterComposer<byte[],long[],Long>(BYTE_ARRAY_TO_LONG_ARRAY, LONG_ARRAY_TO_LONG));</span> +<span class="fc" id="L139"> CONV_BYTE_ARRAY.put(int[].class, BYTE_ARRAY_TO_INT_ARRAY);</span> +<span class="fc" id="L140"> CONV_BYTE_ARRAY.put(long[].class, BYTE_ARRAY_TO_LONG_ARRAY);</span> +<span class="fc" id="L141"> }</span> + + /** + * Class only contains static method. + */ +<span class="nc" id="L146"> private ProviderBuilder() {}</span> + + /** + * Creates a RNG instance. + * + * @param source RNG specification. + * @param seed Seed value. It can be {@code null} (in which case a + * random value will be used). + * @param args Additional arguments to the implementation's constructor. + * @return a new RNG instance. + * @throws UnsupportedOperationException if the seed type is invalid. + */ + public static UniformRandomProvider create(RandomSourceInternal source, + Object seed, + Object[] args) { + // Convert seed to native type. +<span class="fc" id="L162"> final Object nativeSeed = createSeed(source, seed);</span> + + // Build a single array with all the arguments to be passed + // (in the right order) to the constructor. +<span class="fc" id="L166"> final List<Object> all = new ArrayList<Object>();</span> +<span class="fc" id="L167"> all.add(nativeSeed);</span> +<span class="fc bfc" id="L168" title="All 2 branches covered."> if (args != null) {</span> +<span class="fc" id="L169"> all.addAll(Arrays.asList(args));</span> + } + + // Instantiate. +<span class="fc" id="L173"> return create(createConstructor(source), all.toArray());</span> + } + + /** + * Creates a native seed from any of the supported seed types. + * + * @param source Source. + * @param seed Input seed. + * @return the native seed. + * @throw UnsupportedOperationException if the {@code seed} type is invalid. + */ + private static Object createSeed(RandomSourceInternal source, + Object seed) { +<span class="fc" id="L186"> Object nativeSeed = null;</span> + +<span class="fc bfc" id="L188" title="All 2 branches covered."> if (seed == null) {</span> + // Create a random seed of the appropriate native type. + +<span class="fc bfc" id="L191" title="All 2 branches covered."> if (source.getSeed().equals(Integer.class)) {</span> +<span class="fc" id="L192"> nativeSeed = SeedFactory.createInt();</span> +<span class="fc bfc" id="L193" title="All 2 branches covered."> } else if (source.getSeed().equals(Long.class)) {</span> +<span class="fc" id="L194"> nativeSeed = SeedFactory.createLong();</span> +<span class="fc bfc" id="L195" title="All 2 branches covered."> } else if (source.getSeed().equals(int[].class)) {</span> +<span class="fc" id="L196"> nativeSeed = SeedFactory.createIntArray(RANDOM_SEED_ARRAY_SIZE);</span> +<span class="pc bpc" id="L197" title="1 of 2 branches missed."> } else if (source.getSeed().equals(long[].class)) {</span> +<span class="fc" id="L198"> nativeSeed = SeedFactory.createLongArray(RANDOM_SEED_ARRAY_SIZE);</span> + } else { + // Source's native type is not handled. +<span class="nc" id="L201"> throw new IllegalStateException(INTERNAL_ERROR_MSG);</span> + } + } else { + // Convert to native type. + +<span class="fc bfc" id="L206" title="All 2 branches covered."> if (seed instanceof Integer) {</span> +<span class="fc" id="L207"> nativeSeed = CONV_INT.get(source.getSeed()).convert((Integer) seed);</span> +<span class="fc bfc" id="L208" title="All 2 branches covered."> } else if (seed instanceof Long) {</span> +<span class="fc" id="L209"> nativeSeed = CONV_LONG.get(source.getSeed()).convert((Long) seed);</span> +<span class="fc bfc" id="L210" title="All 2 branches covered."> } else if (seed instanceof int[]) {</span> +<span class="fc" id="L211"> nativeSeed = CONV_INT_ARRAY.get(source.getSeed()).convert((int[]) seed);</span> +<span class="fc bfc" id="L212" title="All 2 branches covered."> } else if (seed instanceof long[]) {</span> +<span class="fc" id="L213"> nativeSeed = CONV_LONG_ARRAY.get(source.getSeed()).convert((long[]) seed);</span> +<span class="fc bfc" id="L214" title="All 2 branches covered."> } else if (seed instanceof byte[]) {</span> +<span class="fc" id="L215"> nativeSeed = CONV_BYTE_ARRAY.get(source.getSeed()).convert((byte[]) seed);</span> + } + +<span class="fc bfc" id="L218" title="All 2 branches covered."> if (nativeSeed == null) {</span> + // Since the input seed was not null, getting here means that + // no suitable converter is present in the maps. +<span class="fc" id="L221"> throw new UnsupportedOperationException("Unrecognized seed type");</span> + } + +<span class="pc bpc" id="L224" title="1 of 2 branches missed."> if (!source.isNativeSeed(nativeSeed)) {</span> + // Conversion setup is wrong. +<span class="nc" id="L226"> throw new IllegalStateException(INTERNAL_ERROR_MSG);</span> + } + } + +<span class="fc" id="L230"> return nativeSeed;</span> + } + + /** + * Creates a constructor. + * + * @param source RNG specification. + * @return a RNG constructor. + */ + private static Constructor<?> createConstructor(RandomSourceInternal source) { + try { +<span class="fc" id="L241"> return source.getRng().getConstructor(source.getArgs());</span> +<span class="nc" id="L242"> } catch (NoSuchMethodException e) {</span> + // Info in "RandomSourceInternal" is inconsistent with the + // constructor of the implementation. +<span class="nc" id="L245"> throw new IllegalStateException(INTERNAL_ERROR_MSG, e);</span> + } + } + + /** + * Creates a RNG. + * + * @param rng RNG specification. + * @param args Arguments to the implementation's constructor. + * @return a new RNG instance. + */ + private static UniformRandomProvider create(Constructor<?> rng, + Object[] args) { + try { +<span class="fc" id="L259"> return (UniformRandomProvider) rng.newInstance(args);</span> +<span class="nc" id="L260"> } catch (InvocationTargetException e) {</span> +<span class="nc" id="L261"> throw new IllegalStateException(INTERNAL_ERROR_MSG, e);</span> +<span class="nc" id="L262"> } catch (InstantiationException e) {</span> +<span class="nc" id="L263"> throw new IllegalStateException(INTERNAL_ERROR_MSG, e);</span> +<span class="nc" id="L264"> } catch (IllegalAccessException e) {</span> +<span class="nc" id="L265"> throw new IllegalStateException(INTERNAL_ERROR_MSG, e);</span> + } + } + + /** + * Identifiers of the generators. + */ +<span class="pc" id="L272"> public enum RandomSourceInternal {</span> + /** Source of randomness is {@link JDKRandom}. */ +<span class="fc" id="L274"> JDK(JDKRandom.class,</span> + Long.class), + /** Source of randomness is {@link Well512a}. */ +<span class="fc" id="L277"> WELL_512_A(Well512a.class,</span> + int[].class), + /** Source of randomness is {@link Well1024a}. */ +<span class="fc" id="L280"> WELL_1024_A(Well1024a.class,</span> + int[].class), + /** Source of randomness is {@link Well19937a}. */ +<span class="fc" id="L283"> WELL_19937_A(Well19937a.class,</span> + int[].class), + /** Source of randomness is {@link Well19937c}. */ +<span class="fc" id="L286"> WELL_19937_C(Well19937c.class,</span> + int[].class), + /** Source of randomness is {@link Well44497a}. */ +<span class="fc" id="L289"> WELL_44497_A(Well44497a.class,</span> + int[].class), + /** Source of randomness is {@link Well44497b}. */ +<span class="fc" id="L292"> WELL_44497_B(Well44497b.class,</span> + int[].class), + /** Source of randomness is {@link MersenneTwister}. */ +<span class="fc" id="L295"> MT(MersenneTwister.class,</span> + int[].class), + /** Source of randomness is {@link ISAACRandom}. */ +<span class="fc" id="L298"> ISAAC(ISAACRandom.class,</span> + int[].class), + /** Source of randomness is {@link SplitMix64}. */ +<span class="fc" id="L301"> SPLIT_MIX_64(SplitMix64.class,</span> + Long.class), + /** Source of randomness is {@link XorShift1024Star}. */ +<span class="fc" id="L304"> XOR_SHIFT_1024_S(XorShift1024Star.class,</span> + long[].class), + /** Source of randomness is {@link TwoCmres}. */ +<span class="fc" id="L307"> TWO_CMRES(TwoCmres.class,</span> + Integer.class), + /** + * Source of randomness is {@link TwoCmres} with explicit selection + * of the two subcycle generators. + */ +<span class="fc" id="L313"> TWO_CMRES_SELECT(TwoCmres.class,</span> + Integer.class, + Integer.TYPE, + Integer.TYPE), + /** Source of randomness is {@link MersenneTwister64}. */ +<span class="fc" id="L318"> MT_64(MersenneTwister64.class,</span> + long[].class), + /** Source of randomness is {@link MultiplyWithCarry256}. */ +<span class="fc" id="L321"> MWC_256(MultiplyWithCarry256.class,</span> + int[].class), + /** Source of randomness is {@link KISSRandom}. */ +<span class="fc" id="L324"> KISS(KISSRandom.class,</span> + int[].class); + + /** Source type. */ + private final Class<? extends UniformRandomProvider> rng; + /** Data needed to build the generator. */ + private final Class<?>[] args; + + /** + * @param rng Source type. + * @param args Data needed to create a generator instance. + * The first element must be the native seed type. + */ + RandomSourceInternal(Class<? extends UniformRandomProvider> rng, +<span class="fc" id="L338"> Class<?> ... args) {</span> +<span class="fc" id="L339"> this.rng = rng;</span> +<span class="fc" id="L340"> this.args = Arrays.copyOf(args, args.length);</span> +<span class="fc" id="L341"> }</span> + + /** + * @return the source type. + */ + public Class<?> getRng() { +<span class="fc" id="L347"> return rng;</span> + } + + /** + * @return the seed type. + */ + Class<?> getSeed() { +<span class="fc" id="L354"> return args[0];</span> + } + + /** + * @return the data needed to build the generator. + */ + Class<?>[] getArgs() { +<span class="fc" id="L361"> return args;</span> + } + + /** + * Checks whether the type of given {@code seed} is the native type + * of the implementation. + * + * @param <SEED> Seed type. + * + * @param seed Seed value. + * @return {@code true} if the seed can be passed to the builder + * for this RNG type. + */ + public <SEED> boolean isNativeSeed(SEED seed) { +<span class="fc bfc" id="L375" title="All 2 branches covered."> return seed == null ?</span> + false : +<span class="fc" id="L377"> getSeed().equals(seed.getClass());</span> + } + } +} +</pre><div class="footer"><span class="right">Created with <a href="http://www.eclemma.org/jacoco">JaCoCo</a> 0.7.5.201505241946</span></div></body></html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/commons-rng/blob/d1b3113a/commons-rng-core/site-content/.svn/pristine/2a/2afd2e2203aabafb3cadb5222683054919de80ec.svn-base ---------------------------------------------------------------------- diff --git a/commons-rng-core/site-content/.svn/pristine/2a/2afd2e2203aabafb3cadb5222683054919de80ec.svn-base b/commons-rng-core/site-content/.svn/pristine/2a/2afd2e2203aabafb3cadb5222683054919de80ec.svn-base new file mode 100644 index 0000000..aaf20e6 Binary files /dev/null and b/commons-rng-core/site-content/.svn/pristine/2a/2afd2e2203aabafb3cadb5222683054919de80ec.svn-base differ http://git-wip-us.apache.org/repos/asf/commons-rng/blob/d1b3113a/commons-rng-core/site-content/.svn/pristine/2b/2bf403da72e70e61c68fdfe7f1b7bcfced9f00a5.svn-base ---------------------------------------------------------------------- diff --git a/commons-rng-core/site-content/.svn/pristine/2b/2bf403da72e70e61c68fdfe7f1b7bcfced9f00a5.svn-base b/commons-rng-core/site-content/.svn/pristine/2b/2bf403da72e70e61c68fdfe7f1b7bcfced9f00a5.svn-base new file mode 100644 index 0000000..6b68cbd --- /dev/null +++ b/commons-rng-core/site-content/.svn/pristine/2b/2bf403da72e70e61c68fdfe7f1b7bcfced9f00a5.svn-base @@ -0,0 +1,128 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> +<title>Source code</title> +<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> +</head> +<body> +<div class="sourceContainer"> +<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a> +<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a> +<span class="sourceLineNo">003</span> * contributor license agreements. See the NOTICE file distributed with<a name="line.3"></a> +<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a> +<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a> +<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a> +<span class="sourceLineNo">007</span> * the License. You may obtain a copy of the License at<a name="line.7"></a> +<span class="sourceLineNo">008</span> *<a name="line.8"></a> +<span class="sourceLineNo">009</span> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a> +<span class="sourceLineNo">010</span> *<a name="line.10"></a> +<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a> +<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a> +<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a> +<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a> +<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a> +<span class="sourceLineNo">016</span> */<a name="line.16"></a> +<span class="sourceLineNo">017</span>package org.apache.commons.rng.internal.source32;<a name="line.17"></a> +<span class="sourceLineNo">018</span><a name="line.18"></a> +<span class="sourceLineNo">019</span>/**<a name="line.19"></a> +<span class="sourceLineNo">020</span> * This class implements the WELL44497b pseudo-random number generator<a name="line.20"></a> +<span class="sourceLineNo">021</span> * from Fran&ccedil;ois Panneton, Pierre L'Ecuyer and Makoto Matsumoto.<a name="line.21"></a> +<span class="sourceLineNo">022</span> * <p><a name="line.22"></a> +<span class="sourceLineNo">023</span> * This generator is described in a paper by Fran&ccedil;ois Panneton,<a name="line.23"></a> +<span class="sourceLineNo">024</span> * Pierre L'Ecuyer and Makoto Matsumoto<a name="line.24"></a> +<span class="sourceLineNo">025</span> * <a href="http://www.iro.umontreal.ca/~lecuyer/myftp/papers/wellrng.pdf"><a name="line.25"></a> +<span class="sourceLineNo">026</span> * Improved Long-Period Generators Based on Linear Recurrences Modulo 2</a><a name="line.26"></a> +<span class="sourceLineNo">027</span> * ACM Transactions on Mathematical Software, 32, 1 (2006).<a name="line.27"></a> +<span class="sourceLineNo">028</span> * The errata for the paper are in<a name="line.28"></a> +<span class="sourceLineNo">029</span> * <a href="http://www.iro.umontreal.ca/~lecuyer/myftp/papers/wellrng-errata.txt">wellrng-errata.txt</a>.<a name="line.29"></a> +<span class="sourceLineNo">030</span> * </p><a name="line.30"></a> +<span class="sourceLineNo">031</span> *<a name="line.31"></a> +<span class="sourceLineNo">032</span> * @see <a href="http://www.iro.umontreal.ca/~panneton/WELLRNG.html">WELL Random number generator</a><a name="line.32"></a> +<span class="sourceLineNo">033</span> * @since 1.0<a name="line.33"></a> +<span class="sourceLineNo">034</span> */<a name="line.34"></a> +<span class="sourceLineNo">035</span>public class Well44497b extends Well44497a {<a name="line.35"></a> +<span class="sourceLineNo">036</span> /**<a name="line.36"></a> +<span class="sourceLineNo">037</span> * Creates a new random number generator.<a name="line.37"></a> +<span class="sourceLineNo">038</span> *<a name="line.38"></a> +<span class="sourceLineNo">039</span> * @param seed Initial seed.<a name="line.39"></a> +<span class="sourceLineNo">040</span> */<a name="line.40"></a> +<span class="sourceLineNo">041</span> public Well44497b(int[] seed) {<a name="line.41"></a> +<span class="sourceLineNo">042</span> super(seed);<a name="line.42"></a> +<span class="sourceLineNo">043</span> }<a name="line.43"></a> +<span class="sourceLineNo">044</span><a name="line.44"></a> +<span class="sourceLineNo">045</span> /** {@inheritDoc} */<a name="line.45"></a> +<span class="sourceLineNo">046</span> @Override<a name="line.46"></a> +<span class="sourceLineNo">047</span> public int next() {<a name="line.47"></a> +<span class="sourceLineNo">048</span> int z4 = super.next();<a name="line.48"></a> +<span class="sourceLineNo">049</span><a name="line.49"></a> +<span class="sourceLineNo">050</span> // Matsumoto-Kurita tempering to get a maximally equidistributed generator.<a name="line.50"></a> +<span class="sourceLineNo">051</span> z4 ^= (z4 << 7) & 0x93dd1400;<a name="line.51"></a> +<span class="sourceLineNo">052</span> z4 ^= (z4 << 15) & 0xfa118000;<a name="line.52"></a> +<span class="sourceLineNo">053</span><a name="line.53"></a> +<span class="sourceLineNo">054</span> return z4;<a name="line.54"></a> +<span class="sourceLineNo">055</span> }<a name="line.55"></a> +<span class="sourceLineNo">056</span>}<a name="line.56"></a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</pre> +</div> +</body> +</html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/commons-rng/blob/d1b3113a/commons-rng-core/site-content/.svn/pristine/2c/2c0427ccedc7fe1f91dff53cb80249f97ebe826a.svn-base ---------------------------------------------------------------------- diff --git a/commons-rng-core/site-content/.svn/pristine/2c/2c0427ccedc7fe1f91dff53cb80249f97ebe826a.svn-base b/commons-rng-core/site-content/.svn/pristine/2c/2c0427ccedc7fe1f91dff53cb80249f97ebe826a.svn-base new file mode 100644 index 0000000..ff8c599 --- /dev/null +++ b/commons-rng-core/site-content/.svn/pristine/2c/2c0427ccedc7fe1f91dff53cb80249f97ebe826a.svn-base @@ -0,0 +1,48 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head><meta http-equiv="content-type" content="text/html; charset=UTF-8" /> +<title>IntArray2Int xref</title> +<link type="text/css" rel="stylesheet" href="../../../../../../stylesheet.css" /> +</head> +<body> +<div id="overview"><a href="../../../../../../../apidocs/org/apache/commons/rng/internal/util/IntArray2Int.html">View Javadoc</a></div><pre> +<a class="jxr_linenumber" name="L1" href="#L1">1</a> <em class="jxr_comment">/*</em> +<a class="jxr_linenumber" name="L2" href="#L2">2</a> <em class="jxr_comment"> * Licensed to the Apache Software Foundation (ASF) under one or more</em> +<a class="jxr_linenumber" name="L3" href="#L3">3</a> <em class="jxr_comment"> * contributor license agreements. See the NOTICE file distributed with</em> +<a class="jxr_linenumber" name="L4" href="#L4">4</a> <em class="jxr_comment"> * this work for additional information regarding copyright ownership.</em> +<a class="jxr_linenumber" name="L5" href="#L5">5</a> <em class="jxr_comment"> * The ASF licenses this file to You under the Apache License, Version 2.0</em> +<a class="jxr_linenumber" name="L6" href="#L6">6</a> <em class="jxr_comment"> * (the "License"); you may not use this file except in compliance with</em> +<a class="jxr_linenumber" name="L7" href="#L7">7</a> <em class="jxr_comment"> * the License. You may obtain a copy of the License at</em> +<a class="jxr_linenumber" name="L8" href="#L8">8</a> <em class="jxr_comment"> *</em> +<a class="jxr_linenumber" name="L9" href="#L9">9</a> <em class="jxr_comment"> * <a href="http://www.apache.org/licenses/LICENSE-2." target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.</a>0</em> +<a class="jxr_linenumber" name="L10" href="#L10">10</a> <em class="jxr_comment"> *</em> +<a class="jxr_linenumber" name="L11" href="#L11">11</a> <em class="jxr_comment"> * Unless required by applicable law or agreed to in writing, software</em> +<a class="jxr_linenumber" name="L12" href="#L12">12</a> <em class="jxr_comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em> +<a class="jxr_linenumber" name="L13" href="#L13">13</a> <em class="jxr_comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em> +<a class="jxr_linenumber" name="L14" href="#L14">14</a> <em class="jxr_comment"> * See the License for the specific language governing permissions and</em> +<a class="jxr_linenumber" name="L15" href="#L15">15</a> <em class="jxr_comment"> * limitations under the License.</em> +<a class="jxr_linenumber" name="L16" href="#L16">16</a> <em class="jxr_comment"> */</em> +<a class="jxr_linenumber" name="L17" href="#L17">17</a> <strong class="jxr_keyword">package</strong> org.apache.commons.rng.internal.util; +<a class="jxr_linenumber" name="L18" href="#L18">18</a> +<a class="jxr_linenumber" name="L19" href="#L19">19</a> <em class="jxr_javadoccomment">/**</em> +<a class="jxr_linenumber" name="L20" href="#L20">20</a> <em class="jxr_javadoccomment"> * Creates a single value by "xor" of all the values in the input array.</em> +<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"> * @since 1.0</em> +<a class="jxr_linenumber" name="L23" href="#L23">23</a> <em class="jxr_javadoccomment"> */</em> +<a class="jxr_linenumber" name="L24" href="#L24">24</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../org/apache/commons/rng/internal/util/IntArray2Int.html">IntArray2Int</a> <strong class="jxr_keyword">implements</strong> SeedConverter<<strong class="jxr_keyword">int</strong>[], Integer> { +<a class="jxr_linenumber" name="L25" href="#L25">25</a> <em class="jxr_javadoccomment">/** {@inheritDoc} */</em> +<a class="jxr_linenumber" name="L26" href="#L26">26</a> @Override +<a class="jxr_linenumber" name="L27" href="#L27">27</a> <strong class="jxr_keyword">public</strong> Integer convert(<strong class="jxr_keyword">int</strong>[] seed) { +<a class="jxr_linenumber" name="L28" href="#L28">28</a> <strong class="jxr_keyword">int</strong> out = 0; +<a class="jxr_linenumber" name="L29" href="#L29">29</a> <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i < seed.length; i++) { +<a class="jxr_linenumber" name="L30" href="#L30">30</a> out ^= seed[i]; +<a class="jxr_linenumber" name="L31" href="#L31">31</a> } +<a class="jxr_linenumber" name="L32" href="#L32">32</a> +<a class="jxr_linenumber" name="L33" href="#L33">33</a> <strong class="jxr_keyword">return</strong> out; +<a class="jxr_linenumber" name="L34" href="#L34">34</a> } +<a class="jxr_linenumber" name="L35" href="#L35">35</a> } +</pre> +<hr/> +<div id="footer">Copyright © 2016 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</div> +</body> +</html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/commons-rng/blob/d1b3113a/commons-rng-core/site-content/.svn/pristine/2f/2fc9b239351868dc83b98f752dde64ffd8c995d8.svn-base ---------------------------------------------------------------------- diff --git a/commons-rng-core/site-content/.svn/pristine/2f/2fc9b239351868dc83b98f752dde64ffd8c995d8.svn-base b/commons-rng-core/site-content/.svn/pristine/2f/2fc9b239351868dc83b98f752dde64ffd8c995d8.svn-base new file mode 100644 index 0000000..77c2c4c --- /dev/null +++ b/commons-rng-core/site-content/.svn/pristine/2f/2fc9b239351868dc83b98f752dde64ffd8c995d8.svn-base @@ -0,0 +1,128 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head><meta http-equiv="content-type" content="text/html; charset=UTF-8" /> +<title>GenerationTestPerformance xref</title> +<link type="text/css" rel="stylesheet" href="../../../../stylesheet.css" /> +</head> +<body> +<div id="overview"><a href="../../../../../testapidocs/org/apache/commons/rng/GenerationTestPerformance.html">View Javadoc</a></div><pre> +<a class="jxr_linenumber" name="L1" href="#L1">1</a> <em class="jxr_comment">/*</em> +<a class="jxr_linenumber" name="L2" href="#L2">2</a> <em class="jxr_comment"> * Licensed to the Apache Software Foundation (ASF) under one or more</em> +<a class="jxr_linenumber" name="L3" href="#L3">3</a> <em class="jxr_comment"> * contributor license agreements. See the NOTICE file distributed with</em> +<a class="jxr_linenumber" name="L4" href="#L4">4</a> <em class="jxr_comment"> * this work for additional information regarding copyright ownership.</em> +<a class="jxr_linenumber" name="L5" href="#L5">5</a> <em class="jxr_comment"> * The ASF licenses this file to You under the Apache License, Version 2.0</em> +<a class="jxr_linenumber" name="L6" href="#L6">6</a> <em class="jxr_comment"> * (the "License"); you may not use this file except in compliance with</em> +<a class="jxr_linenumber" name="L7" href="#L7">7</a> <em class="jxr_comment"> * the License. You may obtain a copy of the License at</em> +<a class="jxr_linenumber" name="L8" href="#L8">8</a> <em class="jxr_comment"> *</em> +<a class="jxr_linenumber" name="L9" href="#L9">9</a> <em class="jxr_comment"> * <a href="http://www.apache.org/licenses/LICENSE-2." target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.</a>0</em> +<a class="jxr_linenumber" name="L10" href="#L10">10</a> <em class="jxr_comment"> *</em> +<a class="jxr_linenumber" name="L11" href="#L11">11</a> <em class="jxr_comment"> * Unless required by applicable law or agreed to in writing, software</em> +<a class="jxr_linenumber" name="L12" href="#L12">12</a> <em class="jxr_comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em> +<a class="jxr_linenumber" name="L13" href="#L13">13</a> <em class="jxr_comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em> +<a class="jxr_linenumber" name="L14" href="#L14">14</a> <em class="jxr_comment"> * See the License for the specific language governing permissions and</em> +<a class="jxr_linenumber" name="L15" href="#L15">15</a> <em class="jxr_comment"> * limitations under the License.</em> +<a class="jxr_linenumber" name="L16" href="#L16">16</a> <em class="jxr_comment"> */</em> +<a class="jxr_linenumber" name="L17" href="#L17">17</a> +<a class="jxr_linenumber" name="L18" href="#L18">18</a> <strong class="jxr_keyword">package</strong> org.apache.commons.rng; +<a class="jxr_linenumber" name="L19" href="#L19">19</a> +<a class="jxr_linenumber" name="L20" href="#L20">20</a> <strong class="jxr_keyword">import</strong> org.openjdk.jmh.annotations.Benchmark; +<a class="jxr_linenumber" name="L21" href="#L21">21</a> <strong class="jxr_keyword">import</strong> org.openjdk.jmh.annotations.BenchmarkMode; +<a class="jxr_linenumber" name="L22" href="#L22">22</a> <strong class="jxr_keyword">import</strong> org.openjdk.jmh.annotations.Mode; +<a class="jxr_linenumber" name="L23" href="#L23">23</a> <strong class="jxr_keyword">import</strong> org.openjdk.jmh.annotations.Warmup; +<a class="jxr_linenumber" name="L24" href="#L24">24</a> <strong class="jxr_keyword">import</strong> org.openjdk.jmh.annotations.Measurement; +<a class="jxr_linenumber" name="L25" href="#L25">25</a> <strong class="jxr_keyword">import</strong> org.openjdk.jmh.annotations.State; +<a class="jxr_linenumber" name="L26" href="#L26">26</a> <strong class="jxr_keyword">import</strong> org.openjdk.jmh.annotations.Fork; +<a class="jxr_linenumber" name="L27" href="#L27">27</a> <strong class="jxr_keyword">import</strong> org.openjdk.jmh.annotations.Scope; +<a class="jxr_linenumber" name="L28" href="#L28">28</a> <strong class="jxr_keyword">import</strong> org.openjdk.jmh.annotations.Param; +<a class="jxr_linenumber" name="L29" href="#L29">29</a> <strong class="jxr_keyword">import</strong> org.openjdk.jmh.annotations.OutputTimeUnit; +<a class="jxr_linenumber" name="L30" href="#L30">30</a> <strong class="jxr_keyword">import</strong> org.openjdk.jmh.infra.Blackhole; +<a class="jxr_linenumber" name="L31" href="#L31">31</a> <strong class="jxr_keyword">import</strong> java.util.concurrent.TimeUnit; +<a class="jxr_linenumber" name="L32" href="#L32">32</a> +<a class="jxr_linenumber" name="L33" href="#L33">33</a> <em class="jxr_javadoccomment">/**</em> +<a class="jxr_linenumber" name="L34" href="#L34">34</a> <em class="jxr_javadoccomment"> * Executes benchmark to compare the speed of generation of random numbers</em> +<a class="jxr_linenumber" name="L35" href="#L35">35</a> <em class="jxr_javadoccomment"> * from the various source providers.</em> +<a class="jxr_linenumber" name="L36" href="#L36">36</a> <em class="jxr_javadoccomment"> */</em> +<a class="jxr_linenumber" name="L37" href="#L37">37</a> @BenchmarkMode(Mode.AverageTime) +<a class="jxr_linenumber" name="L38" href="#L38">38</a> @OutputTimeUnit(TimeUnit.MICROSECONDS) +<a class="jxr_linenumber" name="L39" href="#L39">39</a> @Warmup(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS) +<a class="jxr_linenumber" name="L40" href="#L40">40</a> @Measurement(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS) +<a class="jxr_linenumber" name="L41" href="#L41">41</a> @State(Scope.Benchmark) +<a class="jxr_linenumber" name="L42" href="#L42">42</a> @Fork(1) +<a class="jxr_linenumber" name="L43" href="#L43">43</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../org/apache/commons/rng/GenerationTestPerformance.html">GenerationTestPerformance</a> <strong class="jxr_keyword">extends</strong> <a href="../../../../org/apache/commons/rng/AbstractTestPerformance.html">AbstractTestPerformance</a> { +<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"> * Number of random values to generate.</em> +<a class="jxr_linenumber" name="L46" href="#L46">46</a> <em class="jxr_javadoccomment"> */</em> +<a class="jxr_linenumber" name="L47" href="#L47">47</a> @Param({<span class="jxr_string">"1"</span>, <span class="jxr_string">"100"</span>, <span class="jxr_string">"10000"</span>, <span class="jxr_string">"1000000"</span>}) +<a class="jxr_linenumber" name="L48" href="#L48">48</a> <strong class="jxr_keyword">int</strong> numValues; +<a class="jxr_linenumber" name="L49" href="#L49">49</a> +<a class="jxr_linenumber" name="L50" href="#L50">50</a> @Benchmark +<a class="jxr_linenumber" name="L51" href="#L51">51</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> nextBoolean(AbstractTestPerformance.Sources sources, +<a class="jxr_linenumber" name="L52" href="#L52">52</a> Blackhole bh) { +<a class="jxr_linenumber" name="L53" href="#L53">53</a> <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i < numValues; i++) { +<a class="jxr_linenumber" name="L54" href="#L54">54</a> bh.consume(sources.provider.nextBoolean()); +<a class="jxr_linenumber" name="L55" href="#L55">55</a> } +<a class="jxr_linenumber" name="L56" href="#L56">56</a> } +<a class="jxr_linenumber" name="L57" href="#L57">57</a> +<a class="jxr_linenumber" name="L58" href="#L58">58</a> @Benchmark +<a class="jxr_linenumber" name="L59" href="#L59">59</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> nextInt(AbstractTestPerformance.Sources sources, +<a class="jxr_linenumber" name="L60" href="#L60">60</a> Blackhole bh) { +<a class="jxr_linenumber" name="L61" href="#L61">61</a> <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i < numValues; i++) { +<a class="jxr_linenumber" name="L62" href="#L62">62</a> bh.consume(sources.provider.nextInt()); +<a class="jxr_linenumber" name="L63" href="#L63">63</a> } +<a class="jxr_linenumber" name="L64" href="#L64">64</a> } +<a class="jxr_linenumber" name="L65" href="#L65">65</a> +<a class="jxr_linenumber" name="L66" href="#L66">66</a> @Benchmark +<a class="jxr_linenumber" name="L67" href="#L67">67</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> nextIntN(AbstractTestPerformance.Sources sources, +<a class="jxr_linenumber" name="L68" href="#L68">68</a> Blackhole bh) { +<a class="jxr_linenumber" name="L69" href="#L69">69</a> <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> n = 10; +<a class="jxr_linenumber" name="L70" href="#L70">70</a> <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i < numValues; i++) { +<a class="jxr_linenumber" name="L71" href="#L71">71</a> bh.consume(sources.provider.nextInt(n)); +<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> +<a class="jxr_linenumber" name="L75" href="#L75">75</a> @Benchmark +<a class="jxr_linenumber" name="L76" href="#L76">76</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> nextLong(AbstractTestPerformance.Sources sources, +<a class="jxr_linenumber" name="L77" href="#L77">77</a> Blackhole bh) { +<a class="jxr_linenumber" name="L78" href="#L78">78</a> <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i < numValues; i++) { +<a class="jxr_linenumber" name="L79" href="#L79">79</a> bh.consume(sources.provider.nextLong()); +<a class="jxr_linenumber" name="L80" href="#L80">80</a> } +<a class="jxr_linenumber" name="L81" href="#L81">81</a> } +<a class="jxr_linenumber" name="L82" href="#L82">82</a> +<a class="jxr_linenumber" name="L83" href="#L83">83</a> @Benchmark +<a class="jxr_linenumber" name="L84" href="#L84">84</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> nextLongN(AbstractTestPerformance.Sources sources, +<a class="jxr_linenumber" name="L85" href="#L85">85</a> Blackhole bh) { +<a class="jxr_linenumber" name="L86" href="#L86">86</a> <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">long</strong> n = 2L * Integer.MAX_VALUE; +<a class="jxr_linenumber" name="L87" href="#L87">87</a> <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i < numValues; i++) { +<a class="jxr_linenumber" name="L88" href="#L88">88</a> bh.consume(sources.provider.nextLong(n)); +<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> +<a class="jxr_linenumber" name="L92" href="#L92">92</a> @Benchmark +<a class="jxr_linenumber" name="L93" href="#L93">93</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> nextFloat(AbstractTestPerformance.Sources sources, +<a class="jxr_linenumber" name="L94" href="#L94">94</a> Blackhole bh) { +<a class="jxr_linenumber" name="L95" href="#L95">95</a> <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i < numValues; i++) { +<a class="jxr_linenumber" name="L96" href="#L96">96</a> bh.consume(sources.provider.nextFloat()); +<a class="jxr_linenumber" name="L97" href="#L97">97</a> } +<a class="jxr_linenumber" name="L98" href="#L98">98</a> } +<a class="jxr_linenumber" name="L99" href="#L99">99</a> +<a class="jxr_linenumber" name="L100" href="#L100">100</a> @Benchmark +<a class="jxr_linenumber" name="L101" href="#L101">101</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> nextDouble(AbstractTestPerformance.Sources sources, +<a class="jxr_linenumber" name="L102" href="#L102">102</a> Blackhole bh) { +<a class="jxr_linenumber" name="L103" href="#L103">103</a> <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i < numValues; i++) { +<a class="jxr_linenumber" name="L104" href="#L104">104</a> bh.consume(sources.provider.nextDouble()); +<a class="jxr_linenumber" name="L105" href="#L105">105</a> } +<a class="jxr_linenumber" name="L106" href="#L106">106</a> } +<a class="jxr_linenumber" name="L107" href="#L107">107</a> +<a class="jxr_linenumber" name="L108" href="#L108">108</a> @Benchmark +<a class="jxr_linenumber" name="L109" href="#L109">109</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> nextBytes(AbstractTestPerformance.Sources sources, +<a class="jxr_linenumber" name="L110" href="#L110">110</a> Blackhole bh) { +<a class="jxr_linenumber" name="L111" href="#L111">111</a> <strong class="jxr_keyword">final</strong> byte[] result = <strong class="jxr_keyword">new</strong> byte[numValues]; +<a class="jxr_linenumber" name="L112" href="#L112">112</a> sources.provider.nextBytes(result); +<a class="jxr_linenumber" name="L113" href="#L113">113</a> bh.consume(result); +<a class="jxr_linenumber" name="L114" href="#L114">114</a> } +<a class="jxr_linenumber" name="L115" href="#L115">115</a> } +</pre> +<hr/> +<div id="footer">Copyright © 2016 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</div> +</body> +</html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/commons-rng/blob/d1b3113a/commons-rng-core/site-content/.svn/pristine/30/30c8cdc4b88360b5dbbcbb56fbcde03631e7461e.svn-base ---------------------------------------------------------------------- diff --git a/commons-rng-core/site-content/.svn/pristine/30/30c8cdc4b88360b5dbbcbb56fbcde03631e7461e.svn-base b/commons-rng-core/site-content/.svn/pristine/30/30c8cdc4b88360b5dbbcbb56fbcde03631e7461e.svn-base new file mode 100644 index 0000000..143fb64 --- /dev/null +++ b/commons-rng-core/site-content/.svn/pristine/30/30c8cdc4b88360b5dbbcbb56fbcde03631e7461e.svn-base @@ -0,0 +1,127 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- NewPage --> +<html lang="en"> +<head> +<!-- Generated by javadoc --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Uses of Class org.apache.commons.rng.internal.source32.AbstractWell.IndexTable (Apache Commons Rng 1.0-SNAPSHOT API)</title> +<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> +<script type="text/javascript" src="../../../../../../../script.js"></script> +</head> +<body> +<script type="text/javascript"><!-- + try { + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Uses of Class org.apache.commons.rng.internal.source32.AbstractWell.IndexTable (Apache Commons Rng 1.0-SNAPSHOT API)"; + } + } + catch(err) { + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar.top"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.top.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../../org/apache/commons/rng/internal/source32/AbstractWell.IndexTable.html" title="class in org.apache.commons.rng.internal.source32">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../../help-doc.html">Help</a></li> +</ul> +<div class="aboutLanguage"><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></div> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../../index.html?org/apache/commons/rng/internal/source32/class-use/AbstractWell.IndexTable.html" target="_top">Frames</a></li> +<li><a href="AbstractWell.IndexTable.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_top"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h2 title="Uses of Class org.apache.commons.rng.internal.source32.AbstractWell.IndexTable" class="title">Uses of Class<br>org.apache.commons.rng.internal.source32.AbstractWell.IndexTable</h2> +</div> +<div class="classUseContainer">No usage of org.apache.commons.rng.internal.source32.AbstractWell.IndexTable</div> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar.bottom"> +<!-- --> +</a> +<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> +<a name="navbar.bottom.firstrow"> +<!-- --> +</a> +<ul class="navList" title="Navigation"> +<li><a href="../../../../../../../overview-summary.html">Overview</a></li> +<li><a href="../package-summary.html">Package</a></li> +<li><a href="../../../../../../../org/apache/commons/rng/internal/source32/AbstractWell.IndexTable.html" title="class in org.apache.commons.rng.internal.source32">Class</a></li> +<li class="navBarCell1Rev">Use</li> +<li><a href="../package-tree.html">Tree</a></li> +<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> +<li><a href="../../../../../../../index-all.html">Index</a></li> +<li><a href="../../../../../../../help-doc.html">Help</a></li> +</ul> +<div class="aboutLanguage"><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></div> +</div> +<div class="subNav"> +<ul class="navList"> +<li>Prev</li> +<li>Next</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../../../index.html?org/apache/commons/rng/internal/source32/class-use/AbstractWell.IndexTable.html" target="_top">Frames</a></li> +<li><a href="AbstractWell.IndexTable.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> +</ul> +<div> +<script type="text/javascript"><!-- + allClassesLink = document.getElementById("allclasses_navbar_bottom"); + if(window==top) { + allClassesLink.style.display = "block"; + } + else { + allClassesLink.style.display = "none"; + } + //--> +</script> +</div> +<a name="skip.navbar.bottom"> +<!-- --> +</a></div> +<!-- ======== END OF BOTTOM NAVBAR ======= --> +<p class="legalCopy"><small>Copyright © 2016 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> +</body> +</html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/commons-rng/blob/d1b3113a/commons-rng-core/site-content/.svn/pristine/30/30d2a98f43c4cbca21249f2054875404b511dc25.svn-base ---------------------------------------------------------------------- diff --git a/commons-rng-core/site-content/.svn/pristine/30/30d2a98f43c4cbca21249f2054875404b511dc25.svn-base b/commons-rng-core/site-content/.svn/pristine/30/30d2a98f43c4cbca21249f2054875404b511dc25.svn-base new file mode 100644 index 0000000..ad4b238 Binary files /dev/null and b/commons-rng-core/site-content/.svn/pristine/30/30d2a98f43c4cbca21249f2054875404b511dc25.svn-base differ http://git-wip-us.apache.org/repos/asf/commons-rng/blob/d1b3113a/commons-rng-core/site-content/.svn/pristine/32/325ee229f6569d14574b0ae52f6c81db482b2888.svn-base ---------------------------------------------------------------------- diff --git a/commons-rng-core/site-content/.svn/pristine/32/325ee229f6569d14574b0ae52f6c81db482b2888.svn-base b/commons-rng-core/site-content/.svn/pristine/32/325ee229f6569d14574b0ae52f6c81db482b2888.svn-base new file mode 100644 index 0000000..be79631 --- /dev/null +++ b/commons-rng-core/site-content/.svn/pristine/32/325ee229f6569d14574b0ae52f6c81db482b2888.svn-base @@ -0,0 +1,168 @@ +# +# RNG: org.apache.commons.rng.internal.source32.Well19937a +# +# Java: 1.8.0_66 +# Runtime: 1.8.0_66-b17 +# JVM: Java HotSpot(TM) 64-Bit Server VM 25.66-b17 +# OS: Linux 3.16.0-4-amd64 amd64 +# +# Analyzer: /usr/bin/dieharder -a -g 200 -Y 1 -k 2 +# +#=============================================================================# +# dieharder version 3.31.1 Copyright 2003 Robert G. Brown # +#=============================================================================# + rng_name |rands/second| Seed | +stdin_input_raw| 1.55e+07 |3632644450| +#=============================================================================# + test_name |ntup| tsamples |psamples| p-value |Assessment +#=============================================================================# + diehard_birthdays| 0| 100| 100|0.67694774| PASSED + diehard_operm5| 0| 1000000| 100|0.32171307| PASSED + diehard_rank_32x32| 0| 40000| 100|0.00977942| PASSED + diehard_rank_6x8| 0| 100000| 100|0.15774012| PASSED + diehard_bitstream| 0| 2097152| 100|0.22611799| PASSED + diehard_opso| 0| 2097152| 100|0.96010454| PASSED + diehard_oqso| 0| 2097152| 100|0.43984069| PASSED + diehard_dna| 0| 2097152| 100|0.53395077| PASSED +diehard_count_1s_str| 0| 256000| 100|0.21072046| PASSED +diehard_count_1s_byt| 0| 256000| 100|0.55472943| PASSED + diehard_parking_lot| 0| 12000| 100|0.40368950| PASSED + diehard_2dsphere| 2| 8000| 100|0.70095657| PASSED + diehard_3dsphere| 3| 4000| 100|0.97561254| PASSED + diehard_squeeze| 0| 100000| 100|0.19638476| PASSED + diehard_sums| 0| 100| 100|0.02790373| PASSED + diehard_runs| 0| 100000| 100|0.48556682| PASSED + diehard_runs| 0| 100000| 100|0.23502225| PASSED + diehard_craps| 0| 200000| 100|0.03866935| PASSED + diehard_craps| 0| 200000| 100|0.87037793| PASSED + marsaglia_tsang_gcd| 0| 10000000| 100|0.02289649| PASSED + marsaglia_tsang_gcd| 0| 10000000| 100|0.06992852| PASSED + sts_monobit| 1| 100000| 100|0.37072803| PASSED + sts_runs| 2| 100000| 100|0.87526821| PASSED + sts_serial| 1| 100000| 100|0.62686630| PASSED + sts_serial| 2| 100000| 100|0.53270883| PASSED + sts_serial| 3| 100000| 100|0.67575969| PASSED + sts_serial| 3| 100000| 100|0.09858735| PASSED + sts_serial| 4| 100000| 100|0.90403555| PASSED + sts_serial| 4| 100000| 100|0.77120383| PASSED + sts_serial| 5| 100000| 100|0.77343047| PASSED + sts_serial| 5| 100000| 100|0.75162988| PASSED + sts_serial| 6| 100000| 100|0.69962627| PASSED + sts_serial| 6| 100000| 100|0.87879379| PASSED + sts_serial| 7| 100000| 100|0.87274218| PASSED + sts_serial| 7| 100000| 100|0.70044409| PASSED + sts_serial| 8| 100000| 100|0.51586871| PASSED + sts_serial| 8| 100000| 100|0.53701559| PASSED + sts_serial| 9| 100000| 100|0.73496884| PASSED + sts_serial| 9| 100000| 100|0.40186677| PASSED + sts_serial| 10| 100000| 100|0.44158683| PASSED + sts_serial| 10| 100000| 100|0.92719072| PASSED + sts_serial| 11| 100000| 100|0.97072472| PASSED + sts_serial| 11| 100000| 100|0.59838255| PASSED + sts_serial| 12| 100000| 100|0.97582069| PASSED + sts_serial| 12| 100000| 100|0.48497053| PASSED + sts_serial| 13| 100000| 100|0.03550767| PASSED + sts_serial| 13| 100000| 100|0.00583166| PASSED + sts_serial| 14| 100000| 100|0.59583888| PASSED + sts_serial| 14| 100000| 100|0.69825139| PASSED + sts_serial| 15| 100000| 100|0.81113425| PASSED + sts_serial| 15| 100000| 100|0.76094237| PASSED + sts_serial| 16| 100000| 100|0.86797807| PASSED + sts_serial| 16| 100000| 100|0.99739755| WEAK + sts_serial| 1| 100000| 200|0.15459204| PASSED + sts_serial| 2| 100000| 200|0.89390909| PASSED + sts_serial| 3| 100000| 200|0.97935142| PASSED + sts_serial| 3| 100000| 200|0.83282118| PASSED + sts_serial| 4| 100000| 200|0.28782801| PASSED + sts_serial| 4| 100000| 200|0.30975024| PASSED + sts_serial| 5| 100000| 200|0.67019894| PASSED + sts_serial| 5| 100000| 200|0.74058596| PASSED + sts_serial| 6| 100000| 200|0.49262048| PASSED + sts_serial| 6| 100000| 200|0.95353330| PASSED + sts_serial| 7| 100000| 200|0.95805546| PASSED + sts_serial| 7| 100000| 200|0.98374011| PASSED + sts_serial| 8| 100000| 200|0.20016294| PASSED + sts_serial| 8| 100000| 200|0.31202052| PASSED + sts_serial| 9| 100000| 200|0.22738990| PASSED + sts_serial| 9| 100000| 200|0.42023741| PASSED + sts_serial| 10| 100000| 200|0.32695069| PASSED + sts_serial| 10| 100000| 200|0.86529303| PASSED + sts_serial| 11| 100000| 200|0.91400125| PASSED + sts_serial| 11| 100000| 200|0.68256246| PASSED + sts_serial| 12| 100000| 200|0.98406261| PASSED + sts_serial| 12| 100000| 200|0.78042310| PASSED + sts_serial| 13| 100000| 200|0.16997454| PASSED + sts_serial| 13| 100000| 200|0.16325645| PASSED + sts_serial| 14| 100000| 200|0.82160769| PASSED + sts_serial| 14| 100000| 200|0.44661647| PASSED + sts_serial| 15| 100000| 200|0.87019041| PASSED + sts_serial| 15| 100000| 200|0.36990711| PASSED + sts_serial| 16| 100000| 200|0.98905427| PASSED + sts_serial| 16| 100000| 200|0.61200698| PASSED + rgb_bitdist| 1| 100000| 100|0.54636452| PASSED + rgb_bitdist| 2| 100000| 100|0.37600096| PASSED + rgb_bitdist| 3| 100000| 100|0.45979694| PASSED + rgb_bitdist| 4| 100000| 100|0.18205692| PASSED + rgb_bitdist| 5| 100000| 100|0.74758734| PASSED + rgb_bitdist| 6| 100000| 100|0.87406932| PASSED + rgb_bitdist| 7| 100000| 100|0.20278731| PASSED + rgb_bitdist| 8| 100000| 100|0.62206638| PASSED + rgb_bitdist| 9| 100000| 100|0.50795329| PASSED + rgb_bitdist| 10| 100000| 100|0.01014278| PASSED + rgb_bitdist| 11| 100000| 100|0.54488646| PASSED + rgb_bitdist| 12| 100000| 100|0.96672829| PASSED +rgb_minimum_distance| 2| 10000| 1000|0.31887990| PASSED +rgb_minimum_distance| 3| 10000| 1000|0.54513237| PASSED +rgb_minimum_distance| 4| 10000| 1000|0.83093793| PASSED +rgb_minimum_distance| 5| 10000| 1000|0.28665983| PASSED + rgb_permutations| 2| 100000| 100|0.44479855| PASSED + rgb_permutations| 3| 100000| 100|0.06533354| PASSED + rgb_permutations| 4| 100000| 100|0.38427047| PASSED + rgb_permutations| 5| 100000| 100|0.32069607| PASSED + rgb_lagged_sum| 0| 1000000| 100|0.89189440| PASSED + rgb_lagged_sum| 1| 1000000| 100|0.44952220| PASSED + rgb_lagged_sum| 2| 1000000| 100|0.20718812| PASSED + rgb_lagged_sum| 3| 1000000| 100|0.88991868| PASSED + rgb_lagged_sum| 4| 1000000| 100|0.24180481| PASSED + rgb_lagged_sum| 5| 1000000| 100|0.92353231| PASSED + rgb_lagged_sum| 6| 1000000| 100|0.92019210| PASSED + rgb_lagged_sum| 7| 1000000| 100|0.62326657| PASSED + rgb_lagged_sum| 8| 1000000| 100|0.19322391| PASSED + rgb_lagged_sum| 9| 1000000| 100|0.79246316| PASSED + rgb_lagged_sum| 10| 1000000| 100|0.63491983| PASSED + rgb_lagged_sum| 11| 1000000| 100|0.70891242| PASSED + rgb_lagged_sum| 12| 1000000| 100|0.29467409| PASSED + rgb_lagged_sum| 13| 1000000| 100|0.25510619| PASSED + rgb_lagged_sum| 14| 1000000| 100|0.76924218| PASSED + rgb_lagged_sum| 15| 1000000| 100|0.79732984| PASSED + rgb_lagged_sum| 16| 1000000| 100|0.66248751| PASSED + rgb_lagged_sum| 17| 1000000| 100|0.67979201| PASSED + rgb_lagged_sum| 18| 1000000| 100|0.78071782| PASSED + rgb_lagged_sum| 19| 1000000| 100|0.87781554| PASSED + rgb_lagged_sum| 20| 1000000| 100|0.01857483| PASSED + rgb_lagged_sum| 21| 1000000| 100|0.39938432| PASSED + rgb_lagged_sum| 22| 1000000| 100|0.54033807| PASSED + rgb_lagged_sum| 23| 1000000| 100|0.20950266| PASSED + rgb_lagged_sum| 24| 1000000| 100|0.14467206| PASSED + rgb_lagged_sum| 25| 1000000| 100|0.63023264| PASSED + rgb_lagged_sum| 26| 1000000| 100|0.89814627| PASSED + rgb_lagged_sum| 27| 1000000| 100|0.22411964| PASSED + rgb_lagged_sum| 28| 1000000| 100|0.25344307| PASSED + rgb_lagged_sum| 29| 1000000| 100|0.32190130| PASSED + rgb_lagged_sum| 30| 1000000| 100|0.62127995| PASSED + rgb_lagged_sum| 31| 1000000| 100|0.04347938| PASSED + rgb_lagged_sum| 32| 1000000| 100|0.31227839| PASSED + rgb_kstest_test| 0| 10000| 1000|0.37212931| PASSED + dab_bytedistrib| 0| 51200000| 1|0.62645968| PASSED + dab_dct| 256| 50000| 1|0.20284929| PASSED +Preparing to run test 207. ntuple = 0 + dab_filltree| 32| 15000000| 1|0.41241873| PASSED + dab_filltree| 32| 15000000| 1|0.63284517| PASSED +Preparing to run test 208. ntuple = 0 + dab_filltree2| 0| 5000000| 1|0.99338860| PASSED + dab_filltree2| 1| 5000000| 1|0.09716422| PASSED +Preparing to run test 209. ntuple = 0 + dab_monobit2| 12| 65000000| 1|0.60158809| PASSED +# +# Test duration: 92.69844642585001 minutes +#