commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1481558 - in /commons/proper/math/trunk/src: changes/ main/java/org/apache/commons/math3/random/ main/resources/assets/org/apache/commons/math3/random/ test/java/org/apache/commons/math3/random/
Date Sun, 12 May 2013 14:00:07 GMT
Author: tn
Date: Sun May 12 14:00:06 2013
New Revision: 1481558

URL: http://svn.apache.org/r1481558
Log:
[MATH-826] Added SobolSequenceGenerator.

Added:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/random/SobolSequenceGenerator.java   (with props)
    commons/proper/math/trunk/src/main/resources/assets/org/apache/commons/math3/random/
    commons/proper/math/trunk/src/main/resources/assets/org/apache/commons/math3/random/new-joe-kuo-6.1000
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/random/SobolSequenceGeneratorTest.java   (with props)
Modified:
    commons/proper/math/trunk/src/changes/changes.xml

Modified: commons/proper/math/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/changes/changes.xml?rev=1481558&r1=1481557&r2=1481558&view=diff
==============================================================================
--- commons/proper/math/trunk/src/changes/changes.xml (original)
+++ commons/proper/math/trunk/src/changes/changes.xml Sun May 12 14:00:06 2013
@@ -51,6 +51,9 @@ If the output is not quite correct, chec
   </properties>
   <body>
     <release version="x.y" date="TBD" description="TBD">
+      <action dev="tn" type="add" issue="MATH-826" due-to="Sam Halliday">
+        Added low-discrepancy random generator "SobolSequenceGenerator".
+      </action>
       <action dev="tn" type="add" issue="MATH-973" due-to="Mauro Tortonesi">
         Added "GeometricDistribution" to "o.a.c.m.distribution" package.
       </action>

Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/random/SobolSequenceGenerator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/random/SobolSequenceGenerator.java?rev=1481558&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/random/SobolSequenceGenerator.java (added)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/random/SobolSequenceGenerator.java Sun May 12 14:00:06 2013
@@ -0,0 +1,310 @@
+/*
+ * 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.math3.random;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.Arrays;
+import java.util.NoSuchElementException;
+import java.util.StringTokenizer;
+
+import org.apache.commons.math3.exception.MathInternalError;
+import org.apache.commons.math3.exception.MathParseException;
+import org.apache.commons.math3.exception.NotPositiveException;
+import org.apache.commons.math3.exception.NotStrictlyPositiveException;
+import org.apache.commons.math3.exception.OutOfRangeException;
+import org.apache.commons.math3.util.FastMath;
+
+/**
+ * Implementation of a Sobol sequence.
+ * <p>
+ * A Sobol sequence is a low-discrepancy sequence with the property that for all values of N,
+ * its subsequence (x1, ... xN) has a low discrepancy. It can be used to generate pseudo-random
+ * points in a space S, which are equi-distributed.
+ * <p>
+ * The implementation already comes with support for up to 1000 dimensions with direction numbers
+ * calculated from <a href="http://web.maths.unsw.edu.au/~fkuo/sobol/">Stephen Joe and Frances Kuo</a>.
+ * <p>
+ * The generator supports two modes:
+ * <ul>
+ *   <li>sequential generation of points: {@link #nextVector()}</li>
+ *   <li>random access to the i-th point in the sequence: {@link #skipTo(int)}</li>
+ * </ul>
+ *
+ * @see <a href="http://en.wikipedia.org/wiki/Sobol_sequence">Sobol sequence (Wikipedia)</a>
+ * @see <a href="http://web.maths.unsw.edu.au/~fkuo/sobol/">Sobol sequence direction numbers</a>
+ *
+ * @version $Id$
+ * @since 4.0
+ */
+public class SobolSequenceGenerator implements RandomVectorGenerator {
+
+    /** The number of bits to use. */
+    private static final int BITS = 52;
+
+    /** The scaling factor. */
+    private static final double SCALE = FastMath.pow(2, BITS);
+
+    /** The maximum supported space dimension. */
+    private static final int MAX_DIMENSION = 1000;
+
+    /** The resource containing the direction numbers. */
+    private static final String RESOURCE_NAME = "/assets/org/apache/commons/math3/random/new-joe-kuo-6.1000";
+
+    /** Space dimension. */
+    private final int dimension;
+
+    /** The current index in the sequence. */
+    private int count = 0;
+
+    /** The direction vector for each component. */
+    private final long[][] direction;
+
+    /** The current state. */
+    private final long[] x;
+
+    /**
+     * Construct a new Sobol sequence generator for the given space dimension.
+     *
+     * @param dimension the space dimension
+     * @throws OutOfRangeException if the space dimension is outside the allowed range of [1, 1000]
+     */
+    public SobolSequenceGenerator(final int dimension) throws OutOfRangeException {
+        if (dimension < 1 || dimension > MAX_DIMENSION) {
+            throw new OutOfRangeException(dimension, 1, MAX_DIMENSION);
+        }
+
+        // initialize the other dimensions with direction numbers from a resource
+        final InputStream is = getClass().getResourceAsStream(RESOURCE_NAME);
+        if (is == null) {
+            throw new MathInternalError();
+        }
+
+        this.dimension = dimension;
+
+        // init data structures
+        direction = new long[dimension][BITS + 1];
+        x = new long[dimension];
+
+        try {
+            initFromStream(is);
+        } catch (IOException e) {
+            // the internal resource file could not be read -> should not happen
+            throw new MathInternalError();
+        } catch (MathParseException e) {
+            // the internal resource file could not be parsed -> should not happen
+            throw new MathInternalError();
+        }
+    }
+
+    /**
+     * Construct a new Sobol sequence generator for the given space dimension with
+     * direction vectors loaded from the given stream.
+     * <p>
+     * The expected format is identical to the files available from
+     * <a href="http://web.maths.unsw.edu.au/~fkuo/sobol/">Stephen Joe and Frances Kuo</a>.
+     * The first line will be ignored as it is assumed to contain only the column headers.
+     * The columns are:
+     * <ul>
+     *  <li>d: the dimension</li>
+     *  <li>s: the degree of the primitive polynomial</li>
+     *  <li>a: the number representing the coefficients</li>
+     *  <li>m: the list of initial direction numbers</li>
+     * </ul>
+     * Example:
+     * <pre>
+     * d       s       a       m_i
+     * 2       1       0       1
+     * 3       2       1       1 3
+     * </pre>
+     *
+     * @param dimension the space dimension
+     * @param is the stream to read the direction vectors from
+     * @throws NotStrictlyPositiveException if the space dimension is &lt; 1
+     * @throws OutOfRangeException if the space dimension is outside the range [1, max], where
+     *   max refers to the maximum dimension found in the input stream
+     * @throws MathParseException if the content in the stream could not be parsed successfully
+     * @throws IOException if an error occurs while reading from the input stream
+     */
+    public SobolSequenceGenerator(final int dimension, final InputStream is)
+            throws NotStrictlyPositiveException, MathParseException, IOException {
+
+        if (dimension < 1) {
+            throw new NotStrictlyPositiveException(dimension);
+        }
+
+        this.dimension = dimension;
+
+        // init data structures
+        direction = new long[dimension][BITS + 1];
+        x = new long[dimension];
+
+        // initialize the other dimensions with direction numbers from the stream
+        int lastDimension = initFromStream(is);
+        if (lastDimension < dimension) {
+            throw new OutOfRangeException(dimension, 1, lastDimension);
+        }
+    }
+
+    /**
+     * Load the direction vector for each dimension from the given stream.
+     *
+     * @param is the input stream to read the direction vector from
+     * @return the last dimension that has been read from the input stream
+     * @throws IOException if the stream could not be read
+     * @throws MathParseException if the content could not be parsed successfully
+     */
+    private int initFromStream(final InputStream is) throws MathParseException, IOException {
+
+        // special case: dimension 1 -> use unit initialization
+        for (int i = 1; i <= BITS; i++) {
+            direction[0][i] = 1l << (BITS - i);
+        }
+
+        final BufferedReader reader = new BufferedReader(new InputStreamReader(is));
+        int dim = -1;
+
+        try {
+            // ignore first line
+            reader.readLine();
+
+            int lineNumber = 2;
+            int index = 1;
+            String line = null;
+            while ( (line = reader.readLine()) != null) {
+                StringTokenizer st = new StringTokenizer(line, " ");
+                try {
+                    dim = Integer.valueOf(st.nextToken());
+                    if (dim >= 2 && dim <= dimension) { // we have found the right dimension
+                        final int s = Integer.valueOf(st.nextToken());
+                        final int a = Integer.valueOf(st.nextToken());
+                        final int[] m = new int[s + 1];
+                        for (int i = 1; i <= s; i++) {
+                            m[i] = Integer.valueOf(st.nextToken());
+                        }
+                        initDirectionVector(index++, a, m);
+                    }
+
+                    if (dim > dimension) {
+                        return dim;
+                    }
+                } catch (NoSuchElementException e) {
+                    throw new MathParseException(line, lineNumber);
+                } catch (NumberFormatException e) {
+                    throw new MathParseException(line, lineNumber);
+                }
+                lineNumber++;
+            }
+        } finally {
+            reader.close();
+        }
+
+        return dim;
+    }
+
+    /**
+     * Calculate the direction numbers from the given polynomial.
+     *
+     * @param d the dimension, zero-based
+     * @param a the coefficients of the primitive polynomial
+     * @param m the initial direction numbers
+     */
+    private void initDirectionVector(final int d, final int a, final int[] m) {
+        final int s = m.length - 1;
+        for (int i = 1; i <= s; i++) {
+            direction[d][i] = ((long) m[i]) << (BITS - i);
+        }
+        for (int i = s + 1; i <= BITS; i++) {
+            direction[d][i] = direction[d][i - s] ^ (direction[d][i - s] >> s);
+            for (int k = 1; k <= s - 1; k++) {
+                direction[d][i] ^= ((a >> (s - 1 - k)) & 1) * direction[d][i - k];
+            }
+        }
+    }
+
+    /** {@inheritDoc} */
+    public double[] nextVector() {
+        final double[] v = new double[dimension];
+        if (count == 0) {
+            count++;
+            return v;
+        }
+
+        // find the index c of the rightmost 0
+        int c = 1;
+        int value = count - 1;
+        while ((value & 1) == 1) {
+            value >>= 1;
+            c++;
+        }
+
+        for (int i = 0; i < dimension; i++) {
+            x[i] = x[i] ^ direction[i][c];
+            v[i] = (double) x[i] / SCALE;
+        }
+        count++;
+        return v;
+    }
+
+    /**
+     * Skip to the i-th point in the Sobol sequence.
+     * <p>
+     * This operation can be performed in O(1).
+     *
+     * @param index the index in the sequence to skip to
+     * @return the i-th point in the Sobol sequence
+     * @throws NotPositiveException if index &lt; 0
+     */
+    public double[] skipTo(final int index) throws NotPositiveException {
+        if (index == 0) {
+            // reset x vector
+            Arrays.fill(x, 0);
+        } else {
+            final int i = index - 1;
+            final long grayCode = i ^ (i / 2);
+            for (int j = 0; j < dimension; j++) {
+                long result = 0;
+                for (int k = 1; k <= BITS; k++) {
+                    final long shift = grayCode >> (k - 1);
+                    if (shift == 0) {
+                        // stop, as all remaining bits will be zero
+                        break;
+                    }
+                    // the k-th bit of i
+                    final long ik = shift & 1;
+                    result ^= ik * direction[j][k];
+                }
+                x[j] = result;
+            }
+        }
+        count = index;
+        return nextVector();
+    }
+
+    /**
+     * Returns the index i of the next point in the Sobol sequence that will be returned
+     * by calling {@link #nextVector()}.
+     *
+     * @return the index of the next point
+     */
+    public int getNextIndex() {
+        return count;
+    }
+
+}

Propchange: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/random/SobolSequenceGenerator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/random/SobolSequenceGenerator.java
------------------------------------------------------------------------------
    svn:keywords = Id Revision HeadURL

Propchange: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/random/SobolSequenceGenerator.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: commons/proper/math/trunk/src/main/resources/assets/org/apache/commons/math3/random/new-joe-kuo-6.1000
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/resources/assets/org/apache/commons/math3/random/new-joe-kuo-6.1000?rev=1481558&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/resources/assets/org/apache/commons/math3/random/new-joe-kuo-6.1000 (added)
+++ commons/proper/math/trunk/src/main/resources/assets/org/apache/commons/math3/random/new-joe-kuo-6.1000 Sun May 12 14:00:06 2013
@@ -0,0 +1,1000 @@
+d       s       a       m_i     
+2       1       0       1 
+3       2       1       1 3 
+4       3       1       1 3 1 
+5       3       2       1 1 1 
+6       4       1       1 1 3 3 
+7       4       4       1 3 5 13 
+8       5       2       1 1 5 5 17 
+9       5       4       1 1 5 5 5 
+10      5       7       1 1 7 11 19 
+11      5       11      1 1 5 1 1 
+12      5       13      1 1 1 3 11 
+13      5       14      1 3 5 5 31 
+14      6       1       1 3 3 9 7 49 
+15      6       13      1 1 1 15 21 21 
+16      6       16      1 3 1 13 27 49 
+17      6       19      1 1 1 15 7 5 
+18      6       22      1 3 1 15 13 25 
+19      6       25      1 1 5 5 19 61 
+20      7       1       1 3 7 11 23 15 103 
+21      7       4       1 3 7 13 13 15 69 
+22      7       7       1 1 3 13 7 35 63 
+23      7       8       1 3 5 9 1 25 53 
+24      7       14      1 3 1 13 9 35 107 
+25      7       19      1 3 1 5 27 61 31 
+26      7       21      1 1 5 11 19 41 61 
+27      7       28      1 3 5 3 3 13 69 
+28      7       31      1 1 7 13 1 19 1 
+29      7       32      1 3 7 5 13 19 59 
+30      7       37      1 1 3 9 25 29 41 
+31      7       41      1 3 5 13 23 1 55 
+32      7       42      1 3 7 3 13 59 17 
+33      7       50      1 3 1 3 5 53 69 
+34      7       55      1 1 5 5 23 33 13 
+35      7       56      1 1 7 7 1 61 123 
+36      7       59      1 1 7 9 13 61 49 
+37      7       62      1 3 3 5 3 55 33 
+38      8       14      1 3 1 15 31 13 49 245 
+39      8       21      1 3 5 15 31 59 63 97 
+40      8       22      1 3 1 11 11 11 77 249 
+41      8       38      1 3 1 11 27 43 71 9 
+42      8       47      1 1 7 15 21 11 81 45 
+43      8       49      1 3 7 3 25 31 65 79 
+44      8       50      1 3 1 1 19 11 3 205 
+45      8       52      1 1 5 9 19 21 29 157 
+46      8       56      1 3 7 11 1 33 89 185 
+47      8       67      1 3 3 3 15 9 79 71 
+48      8       70      1 3 7 11 15 39 119 27 
+49      8       84      1 1 3 1 11 31 97 225 
+50      8       97      1 1 1 3 23 43 57 177 
+51      8       103     1 3 7 7 17 17 37 71 
+52      8       115     1 3 1 5 27 63 123 213 
+53      8       122     1 1 3 5 11 43 53 133 
+54      9       8       1 3 5 5 29 17 47 173 479 
+55      9       13      1 3 3 11 3 1 109 9 69 
+56      9       16      1 1 1 5 17 39 23 5 343 
+57      9       22      1 3 1 5 25 15 31 103 499 
+58      9       25      1 1 1 11 11 17 63 105 183 
+59      9       44      1 1 5 11 9 29 97 231 363 
+60      9       47      1 1 5 15 19 45 41 7 383 
+61      9       52      1 3 7 7 31 19 83 137 221 
+62      9       55      1 1 1 3 23 15 111 223 83 
+63      9       59      1 1 5 13 31 15 55 25 161 
+64      9       62      1 1 3 13 25 47 39 87 257 
+65      9       67      1 1 1 11 21 53 125 249 293 
+66      9       74      1 1 7 11 11 7 57 79 323 
+67      9       81      1 1 5 5 17 13 81 3 131 
+68      9       82      1 1 7 13 23 7 65 251 475 
+69      9       87      1 3 5 1 9 43 3 149 11 
+70      9       91      1 1 3 13 31 13 13 255 487 
+71      9       94      1 3 3 1 5 63 89 91 127 
+72      9       103     1 1 3 3 1 19 123 127 237 
+73      9       104     1 1 5 7 23 31 37 243 289 
+74      9       109     1 1 5 11 17 53 117 183 491 
+75      9       122     1 1 1 5 1 13 13 209 345 
+76      9       124     1 1 3 15 1 57 115 7 33 
+77      9       137     1 3 1 11 7 43 81 207 175 
+78      9       138     1 3 1 1 15 27 63 255 49 
+79      9       143     1 3 5 3 27 61 105 171 305 
+80      9       145     1 1 5 3 1 3 57 249 149 
+81      9       152     1 1 3 5 5 57 15 13 159 
+82      9       157     1 1 1 11 7 11 105 141 225 
+83      9       167     1 3 3 5 27 59 121 101 271 
+84      9       173     1 3 5 9 11 49 51 59 115 
+85      9       176     1 1 7 1 23 45 125 71 419 
+86      9       181     1 1 3 5 23 5 105 109 75 
+87      9       182     1 1 7 15 7 11 67 121 453 
+88      9       185     1 3 7 3 9 13 31 27 449 
+89      9       191     1 3 1 15 19 39 39 89 15 
+90      9       194     1 1 1 1 1 33 73 145 379 
+91      9       199     1 3 1 15 15 43 29 13 483 
+92      9       218     1 1 7 3 19 27 85 131 431 
+93      9       220     1 3 3 3 5 35 23 195 349 
+94      9       227     1 3 3 7 9 27 39 59 297 
+95      9       229     1 1 3 9 11 17 13 241 157 
+96      9       230     1 3 7 15 25 57 33 189 213 
+97      9       234     1 1 7 1 9 55 73 83 217 
+98      9       236     1 3 3 13 19 27 23 113 249 
+99      9       241     1 3 5 3 23 43 3 253 479 
+100     9       244     1 1 5 5 11 5 45 117 217 
+101     9       253     1 3 3 7 29 37 33 123 147 
+102     10      4       1 3 1 15 5 5 37 227 223 459 
+103     10      13      1 1 7 5 5 39 63 255 135 487 
+104     10      19      1 3 1 7 9 7 87 249 217 599 
+105     10      22      1 1 3 13 9 47 7 225 363 247 
+106     10      50      1 3 7 13 19 13 9 67 9 737 
+107     10      55      1 3 5 5 19 59 7 41 319 677 
+108     10      64      1 1 5 3 31 63 15 43 207 789 
+109     10      69      1 1 7 9 13 39 3 47 497 169 
+110     10      98      1 3 1 7 21 17 97 19 415 905 
+111     10      107     1 3 7 1 3 31 71 111 165 127 
+112     10      115     1 1 5 11 1 61 83 119 203 847 
+113     10      121     1 3 3 13 9 61 19 97 47 35 
+114     10      127     1 1 7 7 15 29 63 95 417 469 
+115     10      134     1 3 1 9 25 9 71 57 213 385 
+116     10      140     1 3 5 13 31 47 101 57 39 341 
+117     10      145     1 1 3 3 31 57 125 173 365 551 
+118     10      152     1 3 7 1 13 57 67 157 451 707 
+119     10      158     1 1 1 7 21 13 105 89 429 965 
+120     10      161     1 1 5 9 17 51 45 119 157 141 
+121     10      171     1 3 7 7 13 45 91 9 129 741 
+122     10      181     1 3 7 1 23 57 67 141 151 571 
+123     10      194     1 1 3 11 17 47 93 107 375 157 
+124     10      199     1 3 3 5 11 21 43 51 169 915 
+125     10      203     1 1 5 3 15 55 101 67 455 625 
+126     10      208     1 3 5 9 1 23 29 47 345 595 
+127     10      227     1 3 7 7 5 49 29 155 323 589 
+128     10      242     1 3 3 7 5 41 127 61 261 717 
+129     10      251     1 3 7 7 17 23 117 67 129 1009 
+130     10      253     1 1 3 13 11 39 21 207 123 305 
+131     10      265     1 1 3 9 29 3 95 47 231 73 
+132     10      266     1 3 1 9 1 29 117 21 441 259 
+133     10      274     1 3 1 13 21 39 125 211 439 723 
+134     10      283     1 1 7 3 17 63 115 89 49 773 
+135     10      289     1 3 7 13 11 33 101 107 63 73 
+136     10      295     1 1 5 5 13 57 63 135 437 177 
+137     10      301     1 1 3 7 27 63 93 47 417 483 
+138     10      316     1 1 3 1 23 29 1 191 49 23 
+139     10      319     1 1 3 15 25 55 9 101 219 607 
+140     10      324     1 3 1 7 7 19 51 251 393 307 
+141     10      346     1 3 3 3 25 55 17 75 337 3 
+142     10      352     1 1 1 13 25 17 65 45 479 413 
+143     10      361     1 1 7 7 27 49 99 161 213 727 
+144     10      367     1 3 5 1 23 5 43 41 251 857 
+145     10      382     1 3 3 7 11 61 39 87 383 835 
+146     10      395     1 1 3 15 13 7 29 7 505 923 
+147     10      398     1 3 7 1 5 31 47 157 445 501 
+148     10      400     1 1 3 7 1 43 9 147 115 605 
+149     10      412     1 3 3 13 5 1 119 211 455 1001 
+150     10      419     1 1 3 5 13 19 3 243 75 843 
+151     10      422     1 3 7 7 1 19 91 249 357 589 
+152     10      426     1 1 1 9 1 25 109 197 279 411 
+153     10      428     1 3 1 15 23 57 59 135 191 75 
+154     10      433     1 1 5 15 29 21 39 253 383 349 
+155     10      446     1 3 3 5 19 45 61 151 199 981 
+156     10      454     1 3 5 13 9 61 107 141 141 1 
+157     10      457     1 3 1 11 27 25 85 105 309 979 
+158     10      472     1 3 3 11 19 7 115 223 349 43 
+159     10      493     1 1 7 9 21 39 123 21 275 927 
+160     10      505     1 1 7 13 15 41 47 243 303 437 
+161     10      508     1 1 1 7 7 3 15 99 409 719 
+162     11      2       1 3 3 15 27 49 113 123 113 67 469 
+163     11      11      1 3 7 11 3 23 87 169 119 483 199 
+164     11      21      1 1 5 15 7 17 109 229 179 213 741 
+165     11      22      1 1 5 13 11 17 25 135 403 557 1433 
+166     11      35      1 3 1 1 1 61 67 215 189 945 1243 
+167     11      49      1 1 7 13 17 33 9 221 429 217 1679 
+168     11      50      1 1 3 11 27 3 15 93 93 865 1049 
+169     11      56      1 3 7 7 25 41 121 35 373 379 1547 
+170     11      61      1 3 3 9 11 35 45 205 241 9 59 
+171     11      70      1 3 1 7 3 51 7 177 53 975 89 
+172     11      74      1 1 3 5 27 1 113 231 299 759 861 
+173     11      79      1 3 3 15 25 29 5 255 139 891 2031 
+174     11      84      1 3 1 1 13 9 109 193 419 95 17 
+175     11      88      1 1 7 9 3 7 29 41 135 839 867 
+176     11      103     1 1 7 9 25 49 123 217 113 909 215 
+177     11      104     1 1 7 3 23 15 43 133 217 327 901 
+178     11      112     1 1 3 3 13 53 63 123 477 711 1387 
+179     11      115     1 1 3 15 7 29 75 119 181 957 247 
+180     11      117     1 1 1 11 27 25 109 151 267 99 1461 
+181     11      122     1 3 7 15 5 5 53 145 11 725 1501 
+182     11      134     1 3 7 1 9 43 71 229 157 607 1835 
+183     11      137     1 3 3 13 25 1 5 27 471 349 127 
+184     11      146     1 1 1 1 23 37 9 221 269 897 1685 
+185     11      148     1 1 3 3 31 29 51 19 311 553 1969 
+186     11      157     1 3 7 5 5 55 17 39 475 671 1529 
+187     11      158     1 1 7 1 1 35 47 27 437 395 1635 
+188     11      162     1 1 7 3 13 23 43 135 327 139 389 
+189     11      164     1 3 7 3 9 25 91 25 429 219 513 
+190     11      168     1 1 3 5 13 29 119 201 277 157 2043 
+191     11      173     1 3 5 3 29 57 13 17 167 739 1031 
+192     11      185     1 3 3 5 29 21 95 27 255 679 1531 
+193     11      186     1 3 7 15 9 5 21 71 61 961 1201 
+194     11      191     1 3 5 13 15 57 33 93 459 867 223 
+195     11      193     1 1 1 15 17 43 127 191 67 177 1073 
+196     11      199     1 1 1 15 23 7 21 199 75 293 1611 
+197     11      213     1 3 7 13 15 39 21 149 65 741 319 
+198     11      214     1 3 7 11 23 13 101 89 277 519 711 
+199     11      220     1 3 7 15 19 27 85 203 441 97 1895 
+200     11      227     1 3 1 3 29 25 21 155 11 191 197 
+201     11      236     1 1 7 5 27 11 81 101 457 675 1687 
+202     11      242     1 3 1 5 25 5 65 193 41 567 781 
+203     11      251     1 3 1 5 11 15 113 77 411 695 1111 
+204     11      256     1 1 3 9 11 53 119 171 55 297 509 
+205     11      259     1 1 1 1 11 39 113 139 165 347 595 
+206     11      265     1 3 7 11 9 17 101 13 81 325 1733 
+207     11      266     1 3 1 1 21 43 115 9 113 907 645 
+208     11      276     1 1 7 3 9 25 117 197 159 471 475 
+209     11      292     1 3 1 9 11 21 57 207 485 613 1661 
+210     11      304     1 1 7 7 27 55 49 223 89 85 1523 
+211     11      310     1 1 5 3 19 41 45 51 447 299 1355 
+212     11      316     1 3 1 13 1 33 117 143 313 187 1073 
+213     11      319     1 1 7 7 5 11 65 97 377 377 1501 
+214     11      322     1 3 1 1 21 35 95 65 99 23 1239 
+215     11      328     1 1 5 9 3 37 95 167 115 425 867 
+216     11      334     1 3 3 13 1 37 27 189 81 679 773 
+217     11      339     1 1 3 11 1 61 99 233 429 969 49 
+218     11      341     1 1 1 7 25 63 99 165 245 793 1143 
+219     11      345     1 1 5 11 11 43 55 65 71 283 273 
+220     11      346     1 1 5 5 9 3 101 251 355 379 1611 
+221     11      362     1 1 1 15 21 63 85 99 49 749 1335 
+222     11      367     1 1 5 13 27 9 121 43 255 715 289 
+223     11      372     1 3 1 5 27 19 17 223 77 571 1415 
+224     11      375     1 1 5 3 13 59 125 251 195 551 1737 
+225     11      376     1 3 3 15 13 27 49 105 389 971 755 
+226     11      381     1 3 5 15 23 43 35 107 447 763 253 
+227     11      385     1 3 5 11 21 3 17 39 497 407 611 
+228     11      388     1 1 7 13 15 31 113 17 23 507 1995 
+229     11      392     1 1 7 15 3 15 31 153 423 79 503 
+230     11      409     1 1 7 9 19 25 23 171 505 923 1989 
+231     11      415     1 1 5 9 21 27 121 223 133 87 697 
+232     11      416     1 1 5 5 9 19 107 99 319 765 1461 
+233     11      421     1 1 3 3 19 25 3 101 171 729 187 
+234     11      428     1 1 3 1 13 23 85 93 291 209 37 
+235     11      431     1 1 1 15 25 25 77 253 333 947 1073 
+236     11      434     1 1 3 9 17 29 55 47 255 305 2037 
+237     11      439     1 3 3 9 29 63 9 103 489 939 1523 
+238     11      446     1 3 7 15 7 31 89 175 369 339 595 
+239     11      451     1 3 7 13 25 5 71 207 251 367 665 
+240     11      453     1 3 3 3 21 25 75 35 31 321 1603 
+241     11      457     1 1 1 9 11 1 65 5 11 329 535 
+242     11      458     1 1 5 3 19 13 17 43 379 485 383 
+243     11      471     1 3 5 13 13 9 85 147 489 787 1133 
+244     11      475     1 3 1 1 5 51 37 129 195 297 1783 
+245     11      478     1 1 3 15 19 57 59 181 455 697 2033 
+246     11      484     1 3 7 1 27 9 65 145 325 189 201 
+247     11      493     1 3 1 15 31 23 19 5 485 581 539 
+248     11      494     1 1 7 13 11 15 65 83 185 847 831 
+249     11      499     1 3 5 7 7 55 73 15 303 511 1905 
+250     11      502     1 3 5 9 7 21 45 15 397 385 597 
+251     11      517     1 3 7 3 23 13 73 221 511 883 1265 
+252     11      518     1 1 3 11 1 51 73 185 33 975 1441 
+253     11      524     1 3 3 9 19 59 21 39 339 37 143 
+254     11      527     1 1 7 1 31 33 19 167 117 635 639 
+255     11      555     1 1 1 3 5 13 59 83 355 349 1967 
+256     11      560     1 1 1 5 19 3 53 133 97 863 983 
+257     11      565     1 3 1 13 9 41 91 105 173 97 625 
+258     11      569     1 1 5 3 7 49 115 133 71 231 1063 
+259     11      578     1 1 7 5 17 43 47 45 497 547 757 
+260     11      580     1 3 5 15 21 61 123 191 249 31 631 
+261     11      587     1 3 7 9 17 7 11 185 127 169 1951 
+262     11      589     1 1 5 13 11 11 9 49 29 125 791 
+263     11      590     1 1 1 15 31 41 13 167 273 429 57 
+264     11      601     1 3 5 3 27 7 35 209 65 265 1393 
+265     11      607     1 3 1 13 31 19 53 143 135 9 1021 
+266     11      611     1 1 7 13 31 5 115 153 143 957 623 
+267     11      614     1 1 5 11 25 19 29 31 297 943 443 
+268     11      617     1 3 3 5 21 11 127 81 479 25 699 
+269     11      618     1 1 3 11 25 31 97 19 195 781 705 
+270     11      625     1 1 5 5 31 11 75 207 197 885 2037 
+271     11      628     1 1 1 11 9 23 29 231 307 17 1497 
+272     11      635     1 1 5 11 11 43 111 233 307 523 1259 
+273     11      641     1 1 7 5 1 21 107 229 343 933 217 
+274     11      647     1 1 1 11 3 21 125 131 405 599 1469 
+275     11      654     1 3 5 5 9 39 33 81 389 151 811 
+276     11      659     1 1 7 7 7 1 59 223 265 529 2021 
+277     11      662     1 3 1 3 9 23 85 181 47 265 49 
+278     11      672     1 3 5 11 19 23 9 7 157 299 1983 
+279     11      675     1 3 1 5 15 5 21 105 29 339 1041 
+280     11      682     1 1 1 1 5 33 65 85 111 705 479 
+281     11      684     1 1 1 7 9 35 77 87 151 321 101 
+282     11      689     1 1 5 7 17 1 51 197 175 811 1229 
+283     11      695     1 3 3 15 23 37 85 185 239 543 731 
+284     11      696     1 3 1 7 7 55 111 109 289 439 243 
+285     11      713     1 1 7 11 17 53 35 217 259 853 1667 
+286     11      719     1 3 1 9 1 63 87 17 73 565 1091 
+287     11      724     1 1 3 3 11 41 1 57 295 263 1029 
+288     11      733     1 1 5 1 27 45 109 161 411 421 1395 
+289     11      734     1 3 5 11 25 35 47 191 339 417 1727 
+290     11      740     1 1 5 15 21 1 93 251 351 217 1767 
+291     11      747     1 3 3 11 3 7 75 155 313 211 491 
+292     11      749     1 3 3 5 11 9 101 161 453 913 1067 
+293     11      752     1 1 3 1 15 45 127 141 163 727 1597 
+294     11      755     1 3 3 7 1 33 63 73 73 341 1691 
+295     11      762     1 3 5 13 15 39 53 235 77 99 949 
+296     11      770     1 1 5 13 31 17 97 13 215 301 1927 
+297     11      782     1 1 7 1 1 37 91 93 441 251 1131 
+298     11      784     1 3 7 9 25 5 105 69 81 943 1459 
+299     11      787     1 3 7 11 31 43 13 209 27 1017 501 
+300     11      789     1 1 7 15 1 33 31 233 161 507 387 
+301     11      793     1 3 3 5 5 53 33 177 503 627 1927 
+302     11      796     1 1 7 11 7 61 119 31 457 229 1875 
+303     11      803     1 1 5 15 19 5 53 201 157 885 1057 
+304     11      805     1 3 7 9 1 35 51 113 249 425 1009 
+305     11      810     1 3 5 7 21 53 37 155 119 345 631 
+306     11      815     1 3 5 7 15 31 109 69 503 595 1879 
+307     11      824     1 3 3 1 25 35 65 131 403 705 503 
+308     11      829     1 3 7 7 19 33 11 153 45 633 499 
+309     11      830     1 3 3 5 11 3 29 93 487 33 703 
+310     11      832     1 1 3 15 21 53 107 179 387 927 1757 
+311     11      841     1 1 3 7 21 45 51 147 175 317 361 
+312     11      847     1 1 1 7 7 13 15 243 269 795 1965 
+313     11      849     1 1 3 5 19 33 57 115 443 537 627 
+314     11      861     1 3 3 9 3 39 25 61 185 717 1049 
+315     11      871     1 3 7 3 7 37 107 153 7 269 1581 
+316     11      878     1 1 7 3 7 41 91 41 145 489 1245 
+317     11      889     1 1 5 9 7 7 105 81 403 407 283 
+318     11      892     1 1 7 9 27 55 29 77 193 963 949 
+319     11      901     1 1 5 3 25 51 107 63 403 917 815 
+320     11      908     1 1 7 3 7 61 19 51 457 599 535 
+321     11      920     1 3 7 1 23 51 105 153 239 215 1847 
+322     11      923     1 1 3 5 27 23 79 49 495 45 1935 
+323     11      942     1 1 1 11 11 47 55 133 495 999 1461 
+324     11      949     1 1 3 15 27 51 93 17 355 763 1675 
+325     11      950     1 3 1 3 1 3 79 119 499 17 995 
+326     11      954     1 1 1 1 15 43 45 17 167 973 799 
+327     11      961     1 1 1 3 27 49 89 29 483 913 2023 
+328     11      968     1 1 3 3 5 11 75 7 41 851 611 
+329     11      971     1 3 1 3 7 57 39 123 257 283 507 
+330     11      973     1 3 3 11 27 23 113 229 187 299 133 
+331     11      979     1 1 3 13 9 63 101 77 451 169 337 
+332     11      982     1 3 7 3 3 59 45 195 229 415 409 
+333     11      986     1 3 5 3 11 19 71 93 43 857 369 
+334     11      998     1 3 7 9 19 33 115 19 241 703 247 
+335     11      1001    1 3 5 11 5 35 21 155 463 1005 1073 
+336     11      1010    1 3 7 3 25 15 109 83 93 69 1189 
+337     11      1012    1 3 5 7 5 21 93 133 135 167 903 
+338     12      41      1 1 7 7 3 59 121 161 285 815 1769 3705 
+339     12      52      1 3 1 1 3 47 103 171 381 609 185 373 
+340     12      61      1 3 3 15 23 33 107 131 441 445 689 2059 
+341     12      62      1 3 3 11 7 53 101 167 435 803 1255 3781 
+342     12      76      1 1 5 11 15 59 41 19 135 835 1263 505 
+343     12      104     1 1 7 11 21 49 23 219 127 961 1065 385 
+344     12      117     1 3 5 15 7 47 117 217 45 731 1639 733 
+345     12      131     1 1 7 11 27 57 91 87 81 35 1269 1007 
+346     12      143     1 1 3 11 15 37 53 219 193 937 1899 3733 
+347     12      145     1 3 5 3 13 11 27 19 199 393 965 2195 
+348     12      157     1 3 1 3 5 1 37 173 413 1023 553 409 
+349     12      167     1 3 1 7 15 29 123 95 255 373 1799 3841 
+350     12      171     1 3 5 13 21 57 51 17 511 195 1157 1831 
+351     12      176     1 1 1 15 29 19 7 73 295 519 587 3523 
+352     12      181     1 1 5 13 13 35 115 191 123 535 717 1661 
+353     12      194     1 3 3 5 23 21 47 251 379 921 1119 297 
+354     12      217     1 3 3 9 29 53 121 201 135 193 523 2943 
+355     12      236     1 1 1 7 29 45 125 9 99 867 425 601 
+356     12      239     1 3 1 9 13 15 67 181 109 293 1305 3079 
+357     12      262     1 3 3 9 5 35 15 209 305 87 767 2795 
+358     12      283     1 3 3 11 27 57 113 123 179 643 149 523 
+359     12      286     1 1 3 15 11 17 67 223 63 657 335 3309 
+360     12      307     1 1 1 9 25 29 109 159 39 513 571 1761 
+361     12      313     1 1 3 1 5 63 75 19 455 601 123 691 
+362     12      319     1 1 1 3 21 5 45 169 377 513 1951 2565 
+363     12      348     1 1 3 11 3 33 119 69 253 907 805 1449 
+364     12      352     1 1 5 13 31 15 17 7 499 61 687 1867 
+365     12      357     1 3 7 11 17 33 73 77 299 243 641 2345 
+366     12      391     1 1 7 11 9 35 31 235 359 647 379 1161 
+367     12      398     1 3 3 15 31 25 5 67 33 45 437 4067 
+368     12      400     1 1 3 11 7 17 37 87 333 253 1517 2921 
+369     12      412     1 1 7 15 7 15 107 189 153 769 1521 3427 
+370     12      415     1 3 5 13 5 61 113 37 293 393 113 43 
+371     12      422     1 1 1 15 29 43 107 31 167 147 301 1021 
+372     12      440     1 1 1 13 3 1 35 93 195 181 2027 1491 
+373     12      460     1 3 3 3 13 33 77 199 153 221 1699 3671 
+374     12      465     1 3 5 13 7 49 123 155 495 681 819 809 
+375     12      468     1 3 5 15 27 61 117 189 183 887 617 4053 
+376     12      515     1 1 1 7 31 59 125 235 389 369 447 1039 
+377     12      536     1 3 5 1 5 39 115 89 249 377 431 3747 
+378     12      539     1 1 1 5 7 47 59 157 77 445 699 3439 
+379     12      551     1 1 3 5 11 21 19 75 11 599 1575 735 
+380     12      558     1 3 5 3 19 13 41 69 199 143 1761 3215 
+381     12      563     1 3 5 7 19 43 25 41 41 11 1647 2783 
+382     12      570     1 3 1 9 19 45 111 97 405 399 457 3219 
+383     12      595     1 1 3 1 23 15 65 121 59 985 829 2259 
+384     12      598     1 1 3 7 17 13 107 229 75 551 1299 2363 
+385     12      617     1 1 5 5 21 57 23 199 509 139 2007 3875 
+386     12      647     1 3 1 11 19 53 15 229 215 741 695 823 
+387     12      654     1 3 7 1 29 3 17 163 417 559 549 319 
+388     12      678     1 3 1 13 17 9 47 133 365 7 1937 1071 
+389     12      713     1 3 5 7 19 37 55 163 301 249 689 2327 
+390     12      738     1 3 5 13 11 23 61 205 257 377 615 1457 
+391     12      747     1 3 5 1 23 37 13 75 331 495 579 3367 
+392     12      750     1 1 1 9 1 23 49 129 475 543 883 2531 
+393     12      757     1 3 1 5 23 59 51 35 343 695 219 369 
+394     12      772     1 3 3 1 27 17 63 97 71 507 1929 613 
+395     12      803     1 1 5 1 21 31 11 109 247 409 1817 2173 
+396     12      810     1 1 3 15 23 9 7 209 301 23 147 1691 
+397     12      812     1 1 7 5 5 19 37 229 249 277 1115 2309 
+398     12      850     1 1 1 5 5 63 5 249 285 431 343 2467 
+399     12      862     1 1 1 11 7 45 35 75 505 537 29 2919 
+400     12      906     1 3 5 15 11 39 15 63 263 9 199 445 
+401     12      908     1 3 3 3 27 63 53 171 227 63 1049 827 
+402     12      929     1 1 3 13 7 11 115 183 179 937 1785 381 
+403     12      930     1 3 1 11 13 15 107 81 53 295 1785 3757 
+404     12      954     1 3 3 13 11 5 109 243 3 505 323 1373 
+405     12      964     1 3 3 11 21 51 17 177 381 937 1263 3889 
+406     12      982     1 3 5 9 27 25 85 193 143 573 1189 2995 
+407     12      985     1 3 5 11 13 9 81 21 159 953 91 1751 
+408     12      991     1 1 3 3 27 61 11 253 391 333 1105 635 
+409     12      992     1 3 3 15 9 57 95 81 419 735 251 1141 
+410     12      1067    1 1 5 9 31 39 59 13 319 807 1241 2433 
+411     12      1070    1 3 3 5 27 13 107 141 423 937 2027 3233 
+412     12      1096    1 3 3 9 9 25 125 23 443 835 1245 847 
+413     12      1099    1 1 7 15 17 17 83 107 411 285 847 1571 
+414     12      1116    1 1 3 13 29 61 37 81 349 727 1453 1957 
+415     12      1143    1 3 7 11 31 13 59 77 273 591 1265 1533 
+416     12      1165    1 1 7 7 13 17 25 25 187 329 347 1473 
+417     12      1178    1 3 7 7 5 51 37 99 221 153 503 2583 
+418     12      1184    1 3 1 13 19 27 11 69 181 479 1183 3229 
+419     12      1202    1 3 3 13 23 21 103 147 323 909 947 315 
+420     12      1213    1 3 1 3 23 1 31 59 93 513 45 2271 
+421     12      1221    1 3 5 1 7 43 109 59 231 41 1515 2385 
+422     12      1240    1 3 1 5 31 57 49 223 283 1013 11 701 
+423     12      1246    1 1 5 1 19 53 55 31 31 299 495 693 
+424     12      1252    1 3 3 9 5 33 77 253 427 791 731 1019 
+425     12      1255    1 3 7 11 1 9 119 203 53 877 1707 3499 
+426     12      1267    1 1 3 7 13 39 55 159 423 113 1653 3455 
+427     12      1293    1 1 3 5 21 47 51 59 55 411 931 251 
+428     12      1301    1 3 7 3 31 25 81 115 405 239 741 455 
+429     12      1305    1 1 5 1 31 3 101 83 479 491 1779 2225 
+430     12      1332    1 3 3 3 9 37 107 161 203 503 767 3435 
+431     12      1349    1 3 7 9 1 27 61 119 233 39 1375 4089 
+432     12      1384    1 1 5 9 1 31 45 51 369 587 383 2813 
+433     12      1392    1 3 7 5 31 7 49 119 487 591 1627 53 
+434     12      1402    1 1 7 1 9 47 1 223 369 711 1603 1917 
+435     12      1413    1 3 5 3 21 37 111 17 483 739 1193 2775 
+436     12      1417    1 3 3 7 17 11 51 117 455 191 1493 3821 
+437     12      1423    1 1 5 9 23 39 99 181 343 485 99 1931 
+438     12      1451    1 3 1 7 29 49 31 71 489 527 1763 2909 
+439     12      1480    1 1 5 11 5 5 73 189 321 57 1191 3685 
+440     12      1491    1 1 5 15 13 45 125 207 371 415 315 983 
+441     12      1503    1 3 3 5 25 59 33 31 239 919 1859 2709 
+442     12      1504    1 3 5 13 27 61 23 115 61 413 1275 3559 
+443     12      1513    1 3 7 15 5 59 101 81 47 967 809 3189 
+444     12      1538    1 1 5 11 31 15 39 25 173 505 809 2677 
+445     12      1544    1 1 5 9 19 13 95 89 511 127 1395 2935 
+446     12      1547    1 1 5 5 31 45 9 57 91 303 1295 3215 
+447     12      1555    1 3 3 3 19 15 113 187 217 489 1285 1803 
+448     12      1574    1 1 3 1 13 29 57 139 255 197 537 2183 
+449     12      1603    1 3 1 15 11 7 53 255 467 9 757 3167 
+450     12      1615    1 3 3 15 21 13 9 189 359 323 49 333 
+451     12      1618    1 3 7 11 7 37 21 119 401 157 1659 1069 
+452     12      1629    1 1 5 7 17 33 115 229 149 151 2027 279 
+453     12      1634    1 1 5 15 5 49 77 155 383 385 1985 945 
+454     12      1636    1 3 7 3 7 55 85 41 357 527 1715 1619 
+455     12      1639    1 1 3 1 21 45 115 21 199 967 1581 3807 
+456     12      1657    1 1 3 7 21 39 117 191 169 73 413 3417 
+457     12      1667    1 1 1 13 1 31 57 195 231 321 367 1027 
+458     12      1681    1 3 7 3 11 29 47 161 71 419 1721 437 
+459     12      1697    1 1 7 3 11 9 43 65 157 1 1851 823 
+460     12      1704    1 1 1 5 21 15 31 101 293 299 127 1321 
+461     12      1709    1 1 7 1 27 1 11 229 241 705 43 1475 
+462     12      1722    1 3 7 1 5 15 73 183 193 55 1345 49 
+463     12      1730    1 3 3 3 19 3 55 21 169 663 1675 137 
+464     12      1732    1 1 1 13 7 21 69 67 373 965 1273 2279 
+465     12      1802    1 1 7 7 21 23 17 43 341 845 465 3355 
+466     12      1804    1 3 5 5 25 5 81 101 233 139 359 2057 
+467     12      1815    1 1 3 11 15 39 55 3 471 765 1143 3941 
+468     12      1826    1 1 7 15 9 57 81 79 215 433 333 3855 
+469     12      1832    1 1 5 5 19 45 83 31 209 363 701 1303 
+470     12      1843    1 3 7 5 1 13 55 163 435 807 287 2031 
+471     12      1849    1 3 3 7 3 3 17 197 39 169 489 1769 
+472     12      1863    1 1 3 5 29 43 87 161 289 339 1233 2353 
+473     12      1905    1 3 3 9 21 9 77 1 453 167 1643 2227 
+474     12      1928    1 1 7 1 15 7 67 33 193 241 1031 2339 
+475     12      1933    1 3 1 11 1 63 45 65 265 661 849 1979 
+476     12      1939    1 3 1 13 19 49 3 11 159 213 659 2839 
+477     12      1976    1 3 5 11 9 29 27 227 253 449 1403 3427 
+478     12      1996    1 1 3 1 7 3 77 143 277 779 1499 475 
+479     12      2013    1 1 1 5 11 23 87 131 393 849 193 3189 
+480     12      2014    1 3 5 11 3 3 89 9 449 243 1501 1739 
+481     12      2020    1 3 1 9 29 29 113 15 65 611 135 3687 
+482     13      13      1 1 1 9 21 19 39 151 395 501 1339 959 2725 
+483     13      19      1 3 7 1 7 35 45 33 119 225 1631 1695 1459 
+484     13      26      1 1 1 3 25 55 37 79 167 907 1075 271 4059 
+485     13      41      1 3 5 13 5 13 53 165 437 67 1705 3177 8095 
+486     13      50      1 3 3 13 27 57 95 55 443 245 1945 1725 1929 
+487     13      55      1 3 1 9 5 33 109 35 99 827 341 2401 2411 
+488     13      69      1 1 5 9 7 33 43 39 87 799 635 3481 7159 
+489     13      70      1 3 1 1 31 15 45 27 337 113 987 2065 2529 
+490     13      79      1 1 5 9 5 15 105 123 479 289 1609 2177 4629 
+491     13      82      1 3 5 11 31 47 97 87 385 195 1041 651 3271 
+492     13      87      1 1 3 7 17 3 101 55 87 629 1687 1387 2745 
+493     13      93      1 3 5 5 7 21 9 237 313 549 1107 117 6183 
+494     13      94      1 1 3 9 9 5 55 201 487 851 1103 2993 4055 
+495     13      97      1 1 5 9 31 19 59 7 363 381 1167 2057 5715 
+496     13      100     1 3 3 15 23 63 19 227 387 827 487 1049 7471 
+497     13      112     1 3 1 5 23 25 61 245 363 863 963 3583 6475 
+498     13      121     1 1 5 1 5 27 81 85 275 49 235 3291 1195 
+499     13      134     1 1 5 7 23 53 85 107 511 779 1265 1093 7859 
+500     13      138     1 3 3 1 9 21 75 219 59 485 1739 3845 1109 
+501     13      148     1 3 5 1 13 41 19 143 293 391 2023 1791 4399 
+502     13      151     1 3 7 15 21 13 21 195 215 413 523 2099 2341 
+503     13      157     1 1 1 3 29 51 47 57 135 575 943 1673 541 
+504     13      161     1 3 5 1 9 13 113 175 447 115 657 4077 5973 
+505     13      179     1 1 1 11 17 41 37 95 297 579 911 2207 2387 
+506     13      181     1 3 5 3 23 11 23 231 93 667 711 1563 7961 
+507     13      188     1 1 7 3 17 59 13 181 141 991 1817 457 1711 
+508     13      196     1 3 3 5 31 59 81 205 245 537 1049 997 1815 
+509     13      203     1 3 7 5 17 13 9 79 17 185 5 2211 6263 
+510     13      206     1 3 7 13 7 53 61 145 13 285 1203 947 2933 
+511     13      223     1 1 7 3 31 19 69 217 47 441 1893 673 4451 
+512     13      224     1 1 1 1 25 9 23 225 385 629 603 3747 4241 
+513     13      227     1 3 1 9 5 37 31 237 431 79 1521 459 2523 
+514     13      230     1 3 7 3 9 43 105 179 5 225 799 1777 4893 
+515     13      239     1 1 3 1 29 45 29 159 267 247 455 847 3909 
+516     13      241     1 1 3 7 25 21 121 57 467 275 719 1521 7319 
+517     13      248     1 3 1 3 11 35 119 123 81 979 1187 3623 4293 
+518     13      253     1 1 1 7 15 25 121 235 25 487 873 1787 1977 
+519     13      268     1 1 1 11 3 7 17 135 345 353 383 4011 2573 
+520     13      274     1 3 7 15 27 13 97 123 65 675 951 1285 6559 
+521     13      283     1 3 7 3 7 1 71 19 325 765 337 1197 2697 
+522     13      286     1 3 5 1 31 37 11 71 169 283 83 3801 7083 
+523     13      289     1 1 3 15 17 29 83 65 275 679 1749 4007 7749 
+524     13      301     1 1 3 1 21 11 41 95 237 361 1819 2783 2383 
+525     13      302     1 3 7 11 29 57 111 187 465 145 605 1987 8109 
+526     13      316     1 1 3 3 19 15 55 83 357 1001 643 1517 6529 
+527     13      319     1 3 1 5 29 35 73 23 77 619 1523 1725 8145 
+528     13      324     1 1 5 5 19 23 7 197 449 337 717 2921 315 
+529     13      331     1 3 5 9 7 63 117 97 97 813 1925 2817 1579 
+530     13      333     1 1 1 11 31 7 25 235 231 133 1007 1371 1553 
+531     13      345     1 1 7 5 19 7 47 171 267 243 1331 567 6033 
+532     13      351     1 1 5 1 7 49 55 89 109 735 1455 3193 6239 
+533     13      358     1 1 1 7 1 61 9 103 3 929 1481 2927 2957 
+534     13      375     1 1 5 13 17 21 75 49 255 1019 1161 2133 1177 
+535     13      379     1 3 1 3 13 15 41 247 211 409 1163 523 2635 
+536     13      381     1 3 7 7 21 59 91 149 479 391 681 2311 6249 
+537     13      386     1 1 5 11 27 53 21 211 197 815 719 1605 255 
+538     13      403     1 1 3 3 9 33 59 3 323 1 101 1135 8105 
+539     13      405     1 3 3 1 29 5 17 141 51 991 841 327 3859 
+540     13      419     1 3 1 5 11 19 23 89 175 173 165 2881 1881 
+541     13      426     1 1 1 15 13 51 87 39 495 611 1341 1531 7029 
+542     13      428     1 1 3 11 13 55 75 185 57 61 1917 2051 5965 
+543     13      439     1 1 5 5 7 53 11 217 213 933 921 3607 5175 
+544     13      440     1 3 3 5 17 53 103 251 369 781 1319 3717 4439 
+545     13      446     1 3 5 13 1 39 25 235 321 773 251 3111 6397 
+546     13      451     1 1 7 3 31 5 25 29 325 385 1313 127 4705 
+547     13      454     1 1 5 15 15 27 15 85 239 243 1633 3473 2621 
+548     13      458     1 3 3 3 9 19 113 13 137 165 25 2957 7549 
+549     13      465     1 3 1 3 11 21 3 97 417 183 1205 1437 247 
+550     13      468     1 1 7 3 17 21 125 55 67 387 385 2323 887 
+551     13      472     1 3 5 5 29 11 103 223 233 641 133 415 1297 
+552     13      475     1 3 3 11 1 9 5 189 235 1007 1363 3985 889 
+553     13      477     1 3 7 9 23 19 19 183 269 403 1643 3559 5189 
+554     13      496     1 3 7 3 29 45 17 69 475 149 1291 2689 7625 
+555     13      502     1 3 7 3 27 37 41 73 253 1001 431 1111 7887 
+556     13      508     1 1 7 5 3 7 87 143 289 495 631 3011 6151 
+557     13      517     1 1 1 13 5 45 17 167 23 975 801 1975 6833 
+558     13      521     1 3 1 11 7 21 39 23 213 429 1301 2059 197 
+559     13      527     1 3 3 15 3 57 121 133 29 711 1961 2497 189 
+560     13      530     1 1 3 5 11 55 115 137 233 673 985 2849 5911 
+561     13      532     1 1 7 15 29 45 1 241 329 323 925 2821 3331 
+562     13      542     1 1 5 7 13 31 81 105 199 145 195 1365 5119 
+563     13      552     1 3 7 11 3 55 11 31 117 343 1265 1837 2451 
+564     13      555     1 1 3 7 29 57 61 179 429 591 177 1945 2159 
+565     13      560     1 3 5 11 23 49 101 137 339 323 1035 1749 7737 
+566     13      566     1 3 1 13 21 35 55 79 19 269 1055 2651 7083 
+567     13      575     1 3 3 11 9 9 95 167 437 361 1185 4083 603 
+568     13      577     1 1 1 7 31 61 77 65 489 657 691 2423 4147 
+569     13      589     1 3 5 7 21 37 87 191 311 453 2013 829 2619 
+570     13      590     1 1 5 9 17 47 35 101 5 813 1157 1279 7365 
+571     13      602     1 1 5 3 11 35 113 199 369 721 901 1471 7801 
+572     13      607     1 3 1 5 9 61 83 157 391 739 1957 2123 4341 
+573     13      608     1 3 5 11 19 19 111 225 383 219 997 717 7505 
+574     13      611     1 3 1 11 13 63 35 127 209 831 501 3017 3507 
+575     13      613     1 3 7 9 29 7 11 163 81 563 1445 3215 6377 
+576     13      625     1 3 7 11 25 3 39 195 491 45 839 4021 4899 
+577     13      644     1 3 7 15 13 5 67 143 117 505 1281 3679 5695 
+578     13      651     1 3 7 9 9 19 21 221 147 763 683 2211 589 
+579     13      654     1 1 3 5 21 47 53 109 299 807 1153 1209 7961 
+580     13      656     1 3 7 11 9 31 45 43 505 647 1127 2681 4917 
+581     13      662     1 1 5 15 31 41 63 113 399 727 673 2587 5259 
+582     13      668     1 1 1 13 17 53 35 99 57 243 1447 1919 2831 
+583     13      681     1 3 7 11 23 51 13 9 49 449 997 3073 4407 
+584     13      682     1 3 5 7 23 33 89 41 415 53 697 1113 1489 
+585     13      689     1 1 3 7 1 13 29 13 255 749 77 3463 1761 
+586     13      696     1 3 3 7 13 15 93 191 309 869 739 1041 3053 
+587     13      699     1 3 5 13 5 19 109 211 347 839 893 2947 7735 
+588     13      707     1 3 1 13 27 3 119 157 485 99 1703 3895 573 
+589     13      709     1 3 7 11 1 23 123 105 31 359 275 1775 3685 
+590     13      714     1 3 3 5 27 11 125 3 413 199 2043 2895 2945 
+591     13      716     1 3 3 3 15 49 121 159 233 543 193 4007 321 
+592     13      719     1 1 3 5 9 47 87 1 51 1011 1595 2239 6467 
+593     13      727     1 3 7 9 1 33 87 137 469 749 1413 805 6817 
+594     13      734     1 3 1 13 19 45 95 227 29 677 1275 3395 4451 
+595     13      738     1 1 7 5 7 63 33 71 443 561 1311 3069 6943 
+596     13      743     1 1 1 13 9 37 23 69 13 415 1479 1197 861 
+597     13      747     1 3 3 13 27 21 13 233 105 777 345 2443 1105 
+598     13      757     1 1 7 11 23 13 21 147 221 549 73 2729 6279 
+599     13      769     1 1 7 7 25 27 15 45 227 39 75 1191 3563 
+600     13      770     1 1 5 7 13 49 99 167 227 13 353 1047 8075 
+601     13      776     1 1 3 13 31 9 27 7 461 737 1559 3243 53 
+602     13      790     1 3 1 1 21 41 97 165 171 821 587 2137 2293 
+603     13      799     1 3 1 11 17 41 29 187 87 599 1467 1395 5931 
+604     13      805     1 1 1 9 9 49 89 205 409 453 61 1923 1257 
+605     13      809     1 3 7 3 9 43 89 143 431 83 1243 1795 3599 
+606     13      812     1 3 5 13 3 25 59 219 43 223 797 2651 6015 
+607     13      820     1 1 5 15 7 55 65 207 213 311 1287 1269 6467 
+608     13      827     1 3 7 11 21 57 31 183 351 857 911 1683 7155 
+609     13      829     1 3 5 11 27 1 21 47 387 383 1593 115 3805 
+610     13      835     1 3 1 1 13 23 87 173 181 619 1653 3931 6073 
+611     13      841     1 1 7 5 17 43 37 61 307 621 1785 55 115 
+612     13      844     1 3 7 15 25 61 123 15 237 671 1473 467 1907 
+613     13      856     1 1 7 5 29 57 75 237 85 699 159 3577 4771 
+614     13      859     1 1 1 11 25 19 51 1 147 31 895 2617 625 
+615     13      862     1 3 7 5 29 15 115 175 395 391 1141 1827 1181 
+616     13      865     1 3 5 7 17 7 11 193 89 243 561 3787 4551 
+617     13      885     1 3 1 11 7 57 7 125 403 947 1261 409 8083 
+618     13      890     1 1 5 13 21 63 115 233 231 921 1747 3635 2519 
+619     13      905     1 1 5 11 3 27 15 91 505 591 1451 3881 2997 
+620     13      916     1 1 3 11 21 9 109 153 317 533 593 3967 2797 
+621     13      925     1 3 3 13 9 57 121 245 219 867 967 791 7095 
+622     13      935     1 1 1 9 29 21 99 35 375 959 329 4087 7171 
+623     13      939     1 1 1 9 11 17 17 97 89 135 631 3809 3253 
+624     13      942     1 1 1 15 21 51 91 249 459 801 757 2353 2033 
+625     13      949     1 3 5 9 23 29 77 53 399 767 1817 2171 1629 
+626     13      953     1 1 3 5 29 5 43 121 17 859 1479 3785 6641 
+627     13      956     1 1 3 7 7 61 45 109 371 833 91 153 4553 
+628     13      961     1 1 3 11 7 55 81 123 389 139 1933 891 1789 
+629     13      968     1 3 7 15 25 17 93 165 503 717 1553 1475 1627 
+630     13      976     1 1 1 13 13 63 13 225 357 571 33 4073 3795 
+631     13      988     1 1 3 11 1 31 107 145 407 961 501 2987 103 
+632     13      995     1 1 7 1 23 63 49 193 173 281 25 2465 5927 
+633     13      997     1 1 7 1 1 1 85 77 273 693 349 1239 4503 
+634     13      1007    1 1 5 11 7 61 9 121 25 357 1443 405 7827 
+635     13      1015    1 1 7 13 11 53 11 207 145 211 1703 1081 2117 
+636     13      1016    1 1 3 11 27 23 19 9 297 279 1481 2273 6387 
+637     13      1027    1 3 3 5 15 45 3 41 305 87 1815 3461 5349 
+638     13      1036    1 3 3 13 9 37 79 125 259 561 1087 4091 793 
+639     13      1039    1 3 5 7 31 55 7 145 347 929 589 2783 5905 
+640     13      1041    1 1 7 15 3 25 1 181 13 243 653 2235 7445 
+641     13      1048    1 3 5 5 17 53 65 7 33 583 1363 1313 2319 
+642     13      1053    1 3 3 7 27 47 97 201 187 321 63 1515 7917 
+643     13      1054    1 1 3 5 23 9 3 165 61 19 1789 3783 3037 
+644     13      1058    1 3 1 13 15 43 125 191 67 273 1551 2227 5253 
+645     13      1075    1 1 1 13 25 53 107 33 299 249 1475 2233 907 
+646     13      1082    1 3 5 1 23 37 85 17 207 643 665 2933 5199 
+647     13      1090    1 1 7 7 25 57 59 41 15 751 751 1749 7053 
+648     13      1109    1 3 3 1 13 25 127 93 281 613 875 2223 6345 
+649     13      1110    1 1 5 3 29 55 79 249 43 317 533 995 1991 
+650     13      1119    1 3 3 15 17 49 79 31 193 233 1437 2615 819 
+651     13      1126    1 1 5 15 25 3 123 145 377 9 455 1191 3953 
+652     13      1130    1 3 5 3 15 19 41 231 81 393 3 19 2409 
+653     13      1135    1 1 3 1 27 43 113 179 7 853 947 2731 297 
+654     13      1137    1 1 1 11 29 39 53 191 443 689 529 3329 7431 
+655     13      1140    1 3 7 5 3 29 19 67 441 113 949 2769 4169 
+656     13      1149    1 3 5 11 11 55 85 169 215 815 803 2345 3967 
+657     13      1156    1 1 7 9 5 45 111 5 419 375 303 1725 4489 
+658     13      1159    1 3 5 15 29 43 79 19 23 417 381 541 4923 
+659     13      1160    1 1 3 15 3 31 117 39 117 305 1227 1223 143 
+660     13      1165    1 1 5 9 5 47 87 239 181 353 1561 3313 1921 
+661     13      1173    1 3 3 1 3 15 53 221 441 987 1997 2529 8059 
+662     13      1178    1 1 7 11 15 57 111 139 137 883 1881 2823 5661 
+663     13      1183    1 3 5 5 21 11 5 13 27 973 587 1331 1373 
+664     13      1184    1 1 7 11 29 51 93 29 217 221 55 2477 1979 
+665     13      1189    1 3 3 13 3 11 49 75 379 371 1441 793 7633 
+666     13      1194    1 1 1 13 19 45 89 249 91 649 1695 915 5619 
+667     13      1211    1 3 1 7 7 29 1 77 313 895 519 771 295 
+668     13      1214    1 3 1 15 5 3 1 57 331 109 485 2853 6831 
+669     13      1216    1 1 1 15 17 3 35 99 245 971 839 2509 2803 
+670     13      1225    1 3 3 3 9 37 57 251 325 317 529 1313 6379 
+671     13      1231    1 1 1 15 25 59 1 119 95 15 795 2375 6463 
+672     13      1239    1 3 1 5 1 49 117 21 47 179 863 85 1669 
+673     13      1243    1 3 7 3 9 37 19 221 455 973 571 1427 817 
+674     13      1246    1 1 1 15 17 9 67 213 127 887 1299 2913 7451 
+675     13      1249    1 3 1 13 27 27 41 43 171 623 691 391 4885 
+676     13      1259    1 3 1 13 17 17 123 239 143 227 1151 519 6543 
+677     13      1273    1 3 7 5 7 63 97 39 101 555 1057 381 7891 
+678     13      1274    1 3 5 1 3 27 85 129 161 875 1945 3541 695 
+679     13      1281    1 3 3 5 21 59 25 183 35 25 987 1459 181 
+680     13      1287    1 3 5 13 1 15 127 237 349 337 1491 2383 7811 
+681     13      1294    1 3 5 5 31 5 109 51 409 733 1395 3207 6049 
+682     13      1296    1 1 5 7 13 35 113 25 263 389 299 2521 1783 
+683     13      1305    1 3 7 11 15 47 97 73 55 75 113 2695 1023 
+684     13      1306    1 3 1 1 3 13 69 211 289 483 1335 787 677 
+685     13      1318    1 1 3 3 17 7 37 77 505 137 1113 345 2975 
+686     13      1332    1 1 1 13 3 11 95 199 453 109 479 3725 239 
+687     13      1335    1 1 7 15 19 53 3 145 359 863 347 3833 3043 
+688     13      1336    1 1 7 15 25 63 127 129 125 195 155 2211 8153 
+689     13      1341    1 1 7 13 9 49 121 115 73 119 1851 727 47 
+690     13      1342    1 3 3 13 13 11 71 7 45 591 133 2407 5563 
+691     13      1362    1 1 1 13 23 29 87 89 501 71 1759 1119 687 
+692     13      1364    1 1 7 7 13 7 13 183 53 951 1877 3991 6771 
+693     13      1368    1 3 7 11 7 1 27 47 61 21 919 961 1091 
+694     13      1378    1 3 5 5 1 27 1 5 63 157 1297 1049 5893 
+695     13      1387    1 3 7 9 19 33 17 133 425 797 1721 153 119 
+696     13      1389    1 3 3 7 13 37 1 215 509 1003 61 2353 7511 
+697     13      1397    1 1 7 1 29 19 31 79 199 555 1209 1603 6089 
+698     13      1401    1 3 1 1 5 31 111 127 333 429 1863 3925 5411 
+699     13      1408    1 1 7 5 5 5 123 191 47 993 269 4051 2111 
+700     13      1418    1 1 5 15 1 9 87 5 47 463 865 1813 7357 
+701     13      1425    1 3 1 3 23 63 123 83 511 777 63 1285 4537 
+702     13      1426    1 3 3 7 27 25 31 65 441 529 1815 1893 323 
+703     13      1431    1 3 7 5 11 19 7 5 397 811 755 2883 4217 
+704     13      1435    1 3 1 13 9 21 13 7 271 539 1769 3243 5325 
+705     13      1441    1 1 7 1 31 13 47 131 181 457 1559 2663 6653 
+706     13      1444    1 3 3 7 29 55 25 203 419 91 437 1159 5691 
+707     13      1462    1 1 3 13 29 19 71 217 337 329 501 939 2205 
+708     13      1471    1 1 3 1 1 27 17 201 97 285 1269 4043 2207 
+709     13      1474    1 1 1 1 3 41 13 199 141 129 1515 3129 5969 
+710     13      1483    1 3 3 9 3 17 119 41 271 933 877 701 2197 
+711     13      1485    1 1 1 7 15 47 3 195 115 821 725 843 6071 
+712     13      1494    1 3 5 15 17 33 85 65 297 571 1123 2743 5727 
+713     13      1497    1 1 5 11 27 15 37 235 415 293 1439 2739 4171 
+714     13      1516    1 3 7 7 1 55 71 35 307 11 401 1881 933 
+715     13      1522    1 3 1 11 21 37 3 177 119 339 559 3991 3437 
+716     13      1534    1 3 3 9 17 17 97 119 301 169 157 3267 2261 
+717     13      1543    1 3 3 9 29 3 111 101 355 869 375 2609 7377 
+718     13      1552    1 3 5 9 7 21 123 99 343 693 1927 1605 4923 
+719     13      1557    1 1 3 5 13 31 99 17 75 385 1539 1553 7077 
+720     13      1558    1 3 3 5 31 35 107 11 407 1019 1317 3593 7203 
+721     13      1567    1 3 3 13 17 33 99 245 401 957 157 1949 1571 
+722     13      1568    1 3 1 11 27 15 11 109 429 307 1911 2701 861 
+723     13      1574    1 1 5 13 13 35 55 255 311 957 1803 2673 5195 
+724     13      1592    1 1 1 11 19 3 89 37 211 783 1355 3567 7135 
+725     13      1605    1 1 5 5 21 49 79 17 509 331 183 3831 855 
+726     13      1606    1 3 7 5 29 19 85 109 105 523 845 3385 7477 
+727     13      1610    1 1 1 7 25 17 125 131 53 757 253 2989 2939 
+728     13      1617    1 3 3 9 19 23 105 39 351 677 211 401 8103 
+729     13      1623    1 3 5 1 5 11 17 3 405 469 1569 2865 3133 
+730     13      1630    1 1 3 13 15 5 117 179 139 145 477 1137 2537 
+731     13      1634    1 1 7 9 5 21 9 93 211 963 1207 3343 4911 
+732     13      1640    1 1 1 9 13 43 17 53 81 793 1571 2523 3683 
+733     13      1643    1 3 3 13 25 21 5 59 489 987 1941 171 6009 
+734     13      1648    1 3 3 7 1 39 89 171 403 467 1767 3423 2791 
+735     13      1651    1 1 3 9 19 49 91 125 163 1013 89 2849 6785 
+736     13      1653    1 1 5 9 9 11 15 241 43 297 1719 1541 1821 
+737     13      1670    1 3 7 15 29 23 103 239 191 33 1043 3649 6579 
+738     13      1676    1 3 3 9 21 51 123 55 223 645 1463 4021 5891 
+739     13      1684    1 1 5 7 3 41 27 235 391 303 2021 3187 7607 
+740     13      1687    1 1 1 9 5 49 49 29 377 251 1887 1017 1301 
+741     13      1691    1 1 3 3 13 41 27 47 223 23 517 3227 6731 
+742     13      1693    1 1 7 1 31 25 47 9 511 623 2047 1263 1511 
+743     13      1698    1 1 3 15 15 23 53 1 261 595 85 241 7047 
+744     13      1709    1 3 3 11 17 5 81 73 149 781 2035 3163 4247 
+745     13      1715    1 3 7 7 29 59 49 79 397 901 1105 2191 6277 
+746     13      1722    1 3 3 11 13 27 25 173 107 73 1265 585 5251 
+747     13      1732    1 1 7 15 29 23 73 229 235 887 1469 4073 2591 
+748     13      1735    1 1 3 9 17 15 83 173 207 879 1701 1509 11 
+749     13      1747    1 1 3 5 5 37 65 161 39 421 1153 2007 5355 
+750     13      1749    1 1 7 11 23 37 5 11 9 499 17 157 5747 
+751     13      1754    1 3 7 13 25 9 49 7 39 945 1349 1759 1441 
+752     13      1777    1 1 5 3 21 15 113 81 265 837 333 3625 6133 
+753     13      1784    1 3 1 11 13 27 73 109 297 327 299 3253 6957 
+754     13      1790    1 1 3 13 19 39 123 73 65 5 1061 2187 5055 
+755     13      1795    1 1 3 1 11 31 21 115 453 857 711 495 549 
+756     13      1801    1 3 7 7 15 29 79 103 47 713 1735 3121 6321 
+757     13      1802    1 1 5 5 29 9 97 33 471 705 329 1501 1349 
+758     13      1812    1 3 3 1 21 9 111 209 71 47 491 2143 1797 
+759     13      1828    1 3 3 3 11 39 21 135 445 259 607 3811 5449 
+760     13      1831    1 1 7 9 11 25 113 251 395 317 317 91 1979 
+761     13      1837    1 3 1 9 3 21 103 133 389 943 1235 1749 7063 
+762     13      1838    1 1 3 7 1 11 5 15 497 477 479 3079 6969 
+763     13      1840    1 1 3 3 15 39 105 131 475 465 181 865 3813 
+764     13      1845    1 1 7 9 19 63 123 131 415 525 457 2471 3135 
+765     13      1863    1 3 7 15 25 35 123 45 341 805 485 4049 7065 
+766     13      1864    1 1 1 5 29 9 47 227 51 867 1873 1593 2271 
+767     13      1867    1 1 7 15 31 9 71 117 285 711 837 1435 6275 
+768     13      1870    1 3 1 1 5 19 79 25 301 415 1871 645 3251 
+769     13      1877    1 3 1 3 17 51 99 185 447 43 523 219 429 
+770     13      1881    1 3 1 13 29 13 51 93 7 995 757 3017 6865 
+771     13      1884    1 1 3 15 7 25 75 17 155 981 1231 1229 1995 
+772     13      1903    1 3 5 3 27 45 71 73 225 763 377 1139 2863 
+773     13      1917    1 1 3 1 1 39 69 113 29 371 1051 793 3749 
+774     13      1918    1 1 3 13 23 61 27 183 307 431 1345 2757 4031 
+775     13      1922    1 3 7 5 5 59 117 197 303 721 877 723 1601 
+776     13      1924    1 3 5 1 27 33 99 237 485 711 665 3077 5105 
+777     13      1928    1 1 3 1 13 9 103 201 23 951 2029 165 2093 
+778     13      1931    1 3 5 13 5 29 55 85 221 677 611 3613 4567 
+779     13      1951    1 1 1 1 7 61 9 233 261 561 953 4023 2443 
+780     13      1952    1 3 3 13 1 17 103 71 223 213 833 1747 6999 
+781     13      1957    1 3 5 15 25 53 57 187 25 695 1207 4089 2877 
+782     13      1958    1 1 7 1 7 31 87 129 493 519 1555 1155 4637 
+783     13      1964    1 1 1 15 21 17 23 29 19 255 927 1791 3093 
+784     13      1967    1 1 3 9 17 33 95 129 175 461 287 2633 2325 
+785     13      1970    1 3 5 7 23 19 63 209 249 583 1373 2039 2225 
+786     13      1972    1 3 3 5 5 19 79 241 459 355 1455 3313 3639 
+787     13      1994    1 1 7 9 21 41 97 119 129 769 1541 3495 7741 
+788     13      2002    1 1 7 11 9 29 35 255 141 937 1763 41 1393 
+789     13      2007    1 3 7 1 13 51 61 157 177 847 1829 3539 285 
+790     13      2008    1 1 1 15 21 13 9 55 397 19 1495 1255 7235 
+791     13      2023    1 1 7 7 25 37 53 237 319 197 269 1205 1485 
+792     13      2030    1 1 5 15 23 17 35 247 323 807 233 3681 4407 
+793     13      2035    1 1 3 7 9 59 85 105 493 763 1639 391 1451 
+794     13      2038    1 3 3 9 15 33 5 253 129 625 1527 2793 6057 
+795     13      2042    1 3 1 1 7 47 21 161 235 83 397 3563 5953 
+796     13      2047    1 3 7 11 3 41 25 117 375 779 1297 3715 8117 
+797     13      2051    1 1 3 7 31 19 103 173 475 189 2035 2921 1107 
+798     13      2058    1 1 7 3 25 7 93 255 307 113 1893 2233 6919 
+799     13      2060    1 3 5 15 9 57 79 143 165 5 1389 193 693 
+800     13      2071    1 3 5 1 29 45 91 49 189 461 439 1283 7835 
+801     13      2084    1 1 3 13 11 61 41 231 373 695 395 915 5393 
+802     13      2087    1 3 7 11 5 51 67 53 483 95 1943 247 5653 
+803     13      2099    1 3 7 5 5 57 45 235 137 793 1069 1661 1557 
+804     13      2108    1 3 5 3 25 55 103 177 81 861 1151 143 7655 
+805     13      2111    1 1 3 1 21 41 67 131 253 431 1269 3181 3429 
+806     13      2120    1 3 1 1 21 7 77 221 257 663 71 2949 2481 
+807     13      2128    1 3 5 3 3 23 45 107 299 739 1013 3 3165 
+808     13      2138    1 1 5 1 3 37 109 37 243 983 1221 1691 3869 
+809     13      2143    1 1 5 5 31 7 5 193 397 867 1495 3435 7441 
+810     13      2144    1 1 1 1 17 59 97 233 389 597 1013 1631 483 
+811     13      2153    1 1 1 11 7 41 107 53 111 125 1513 1921 7647 
+812     13      2156    1 3 3 3 31 29 117 3 365 971 1139 2123 5913 
+813     13      2162    1 1 1 13 23 3 1 167 475 639 1811 3841 3081 
+814     13      2167    1 1 5 3 5 47 65 123 275 783 95 119 7591 
+815     13      2178    1 3 1 15 13 33 93 237 467 431 705 4013 4035 
+816     13      2183    1 3 5 1 19 7 101 231 155 737 1381 3343 2051 
+817     13      2202    1 1 5 9 15 49 45 163 433 765 2031 201 2589 
+818     13      2211    1 3 7 9 19 41 31 89 93 623 105 745 4409 
+819     13      2214    1 1 5 1 11 45 127 85 389 439 829 477 7965 
+820     13      2223    1 3 3 15 13 41 1 207 435 585 311 1725 2737 
+821     13      2225    1 3 3 3 13 49 21 31 197 799 1411 2959 7133 
+822     13      2232    1 3 1 3 7 43 9 141 133 579 1059 93 957 
+823     13      2237    1 3 7 1 15 51 23 213 381 851 699 2261 3419 
+824     13      2257    1 3 5 9 25 35 67 141 35 409 1423 365 1645 
+825     13      2260    1 3 3 11 15 33 27 181 93 87 1761 3511 1353 
+826     13      2267    1 3 5 3 25 63 111 137 321 819 705 1547 7271 
+827     13      2274    1 3 1 1 5 57 99 59 411 757 1371 3953 3695 
+828     13      2276    1 3 5 11 11 21 25 147 239 455 709 953 7175 
+829     13      2285    1 3 3 15 5 53 91 205 341 63 723 1565 7135 
+830     13      2288    1 1 7 15 11 21 99 79 63 593 2007 3629 5271 
+831     13      2293    1 3 3 1 9 21 45 175 453 435 1855 2649 6959 
+832     13      2294    1 1 3 15 15 33 121 121 251 431 1127 3305 4199 
+833     13      2297    1 1 1 9 31 15 71 29 345 391 1159 2809 345 
+834     13      2303    1 3 7 1 23 29 95 151 327 727 647 1623 2971 
+835     13      2308    1 1 7 7 9 29 79 91 127 909 1293 1315 5315 
+836     13      2311    1 1 5 11 13 37 89 73 149 477 1909 3343 525 
+837     13      2318    1 3 5 7 5 59 55 255 223 459 2027 237 4205 
+838     13      2323    1 1 1 7 27 11 95 65 325 835 907 3801 3787 
+839     13      2332    1 1 1 11 27 33 99 175 51 913 331 1851 4133 
+840     13      2341    1 3 5 5 13 37 31 99 273 409 1827 3845 5491 
+841     13      2345    1 1 3 7 23 19 107 85 283 523 509 451 421 
+842     13      2348    1 3 5 7 13 9 51 81 87 619 61 2803 5271 
+843     13      2354    1 1 1 15 9 45 35 219 401 271 953 649 6847 
+844     13      2368    1 1 7 11 9 45 17 219 169 837 1483 1605 2901 
+845     13      2377    1 1 7 7 21 43 37 33 291 359 71 2899 7037 
+846     13      2380    1 3 3 13 31 53 37 15 149 949 551 3445 5455 
+847     13      2383    1 3 1 5 19 45 81 223 193 439 2047 3879 789 
+848     13      2388    1 1 7 3 11 63 35 61 255 563 459 2991 3359 
+849     13      2395    1 1 5 9 13 49 47 185 239 221 1533 3635 2045 
+850     13      2397    1 3 7 3 25 37 127 223 51 357 483 3837 6873 
+851     13      2401    1 1 7 9 31 37 113 31 387 833 1243 1543 5535 
+852     13      2411    1 3 1 9 23 59 119 221 73 185 2007 2885 2563 
+853     13      2413    1 1 1 13 7 33 53 179 67 185 1541 1807 4659 
+854     13      2419    1 3 1 11 31 37 23 215 269 357 207 645 4219 
+855     13      2435    1 3 3 13 19 27 107 55 91 71 1695 1815 89 
+856     13      2442    1 1 3 15 3 19 35 247 49 529 1523 3317 6151 
+857     13      2455    1 1 7 7 23 25 107 139 483 503 1277 243 7879 
+858     13      2472    1 3 3 13 3 15 11 197 135 839 985 275 5527 
+859     13      2478    1 3 5 3 25 47 95 21 113 307 1001 3065 295 
+860     13      2490    1 1 3 9 19 19 99 213 363 449 735 2851 2521 
+861     13      2507    1 1 3 9 5 49 63 61 157 857 497 2801 6987 
+862     13      2509    1 1 1 9 1 41 109 119 499 939 867 3675 8023 
+863     13      2517    1 3 1 1 13 33 109 123 289 3 1271 2773 4265 
+864     13      2524    1 3 1 11 9 57 83 221 95 43 1189 457 7133 
+865     13      2528    1 1 7 3 11 49 33 219 229 289 685 3359 4495 
+866     13      2531    1 3 1 3 19 43 67 193 41 771 407 81 3891 
+867     13      2538    1 1 7 11 5 29 51 175 297 539 1 2245 6439 
+868     13      2545    1 3 7 15 21 33 117 183 511 489 1283 3281 5979 
+869     13      2546    1 3 7 5 9 3 125 147 359 549 369 3049 2405 
+870     13      2555    1 3 5 7 19 5 65 97 483 377 1523 1457 2995 
+871     13      2557    1 1 5 1 11 21 41 113 277 131 1475 1043 2367 
+872     13      2564    1 3 3 1 15 17 101 69 443 865 817 1421 5231 
+873     13      2573    1 1 3 3 3 55 95 99 75 195 1929 3931 5855 
+874     13      2579    1 3 1 3 19 23 93 213 241 551 1307 585 7729 
+875     13      2592    1 3 1 11 23 15 53 249 467 519 95 741 409 
+876     13      2598    1 1 1 15 29 37 43 203 233 877 77 1933 2729 
+877     13      2607    1 3 7 11 27 39 43 161 255 15 1463 833 495 
+878     13      2612    1 1 7 11 3 53 81 67 375 823 1903 3061 395 
+879     13      2619    1 1 1 1 15 37 93 233 247 501 1321 3275 5409 
+880     13      2621    1 3 3 7 7 11 5 105 139 983 1239 531 3881 
+881     13      2627    1 1 5 3 19 49 107 227 361 101 355 2649 7383 
+882     13      2633    1 1 7 5 25 41 101 121 209 293 1937 2259 5557 
+883     13      2636    1 1 3 7 7 1 9 13 463 1019 995 3159 107 
+884     13      2642    1 3 5 11 5 35 127 97 261 789 807 807 6257 
+885     13      2654    1 1 7 5 11 13 45 91 417 101 1973 3645 2107 
+886     13      2660    1 1 3 7 5 63 57 49 203 157 115 1393 8117 
+887     13      2669    1 3 5 5 3 43 15 155 127 489 1165 3701 4867 
+888     13      2675    1 1 7 7 29 29 69 215 415 367 371 1901 6075 
+889     13      2684    1 1 1 3 11 33 89 149 433 705 1437 1597 505 
+890     13      2694    1 3 5 1 13 37 19 119 5 581 2037 1633 2099 
+891     13      2703    1 3 7 13 5 49 103 245 215 515 133 2007 1933 
+892     13      2706    1 3 1 9 1 3 25 197 253 387 1683 2267 221 
+893     13      2712    1 3 5 15 21 9 73 201 405 999 437 3877 6045 
+894     13      2715    1 1 3 1 31 55 25 83 421 395 1807 2129 7797 
+895     13      2722    1 1 3 1 23 21 121 183 125 347 143 3685 4317 
+896     13      2727    1 3 3 3 17 45 17 223 267 795 1815 1309 155 
+897     13      2734    1 1 1 15 17 59 5 133 15 715 1503 153 2887 
+898     13      2742    1 1 1 1 27 13 119 77 243 995 1851 3719 4695 
+899     13      2745    1 3 1 5 31 49 43 165 49 609 1265 1141 505 
+900     13      2751    1 1 7 13 11 63 21 253 229 585 1543 3719 4141 
+901     13      2766    1 3 7 11 23 27 17 131 295 895 1493 1411 3247 
+902     13      2768    1 1 5 9 29 7 97 15 113 445 859 1483 1121 
+903     13      2780    1 3 1 9 13 49 99 107 323 201 681 3071 5281 
+904     13      2790    1 1 1 15 9 19 61 161 7 87 587 2199 2811 
+905     13      2794    1 3 3 15 15 19 95 45 299 829 981 3479 487 
+906     13      2796    1 1 1 9 3 37 7 19 227 13 397 513 1257 
+907     13      2801    1 1 5 15 15 13 17 111 135 929 1145 811 1801 
+908     13      2804    1 3 1 3 27 57 31 19 279 103 693 631 3409 
+909     13      2807    1 1 1 1 15 13 67 83 23 799 1735 2063 3363 
+910     13      2816    1 3 3 7 3 1 61 31 41 533 2025 4067 6963 
+911     13      2821    1 1 5 7 17 27 81 79 107 205 29 97 4883 
+912     13      2831    1 1 1 5 19 49 91 201 283 949 651 3819 5073 
+913     13      2834    1 1 7 9 11 13 73 197 37 219 1931 3369 6017 
+914     13      2839    1 1 7 15 11 7 75 205 7 819 399 661 6487 
+915     13      2845    1 3 3 3 27 37 95 41 307 165 1077 3485 563 
+916     13      2852    1 3 5 3 21 49 57 179 109 627 1789 431 2941 
+917     13      2856    1 1 7 5 11 19 43 137 149 679 1543 245 1381 
+918     13      2861    1 3 5 5 15 3 69 81 135 159 1363 3401 6355 
+919     13      2873    1 3 5 1 9 61 49 53 319 25 1647 1297 615 
+920     13      2874    1 3 5 11 31 43 9 101 71 919 335 3147 5823 
+921     13      2888    1 3 1 1 15 5 29 109 511 945 867 3677 6915 
+922     13      2893    1 3 3 15 17 49 91 111 215 29 1879 97 2505 
+923     13      2894    1 3 1 13 19 61 11 111 163 777 533 1113 5339 
+924     13      2902    1 1 7 9 17 55 117 91 455 289 557 913 4455 
+925     13      2917    1 3 1 7 25 19 123 37 1 277 717 2965 4469 
+926     13      2921    1 3 7 3 19 23 87 235 209 457 2041 2893 1805 
+927     13      2922    1 3 3 5 5 43 23 61 351 791 59 2009 2909 
+928     13      2929    1 1 3 7 5 1 27 231 385 257 1261 2701 1807 
+929     13      2935    1 3 1 1 27 19 87 253 131 685 1743 3983 2651 
+930     13      2946    1 3 7 11 21 17 11 81 191 641 1821 3005 7251 
+931     13      2951    1 3 3 5 15 31 41 213 55 931 1953 49 6037 
+932     13      2957    1 1 7 15 7 27 65 223 113 79 1875 911 5445 
+933     13      2960    1 3 7 7 23 55 51 167 495 25 1585 3447 799 
+934     13      2966    1 1 3 7 27 15 95 193 337 415 975 3085 967 
+935     13      2972    1 1 7 15 19 7 93 41 433 551 401 3169 3971 
+936     13      2976    1 1 7 11 13 15 53 69 433 59 1117 3359 6231 
+937     13      2979    1 1 7 3 23 5 115 201 225 109 1903 3897 6265 
+938     13      2985    1 1 1 11 17 1 39 143 361 659 1105 23 4923 
+939     13      3000    1 1 1 9 27 57 85 227 261 119 1881 3965 6999 
+940     13      3003    1 3 7 7 15 7 107 17 315 49 1591 905 7789 
+941     13      3013    1 3 1 7 29 3 47 237 157 769 839 3199 3195 
+942     13      3018    1 1 3 15 25 39 63 15 111 857 881 1505 7671 
+943     13      3020    1 1 7 1 3 35 41 215 99 895 1025 1483 4707 
+944     13      3025    1 3 5 1 1 31 25 247 113 841 397 1825 6969 
+945     13      3042    1 1 3 5 19 41 49 243 225 973 241 175 1041 
+946     13      3047    1 1 1 7 15 15 105 141 83 75 1675 3523 5219 
+947     13      3048    1 1 7 5 13 27 47 199 445 841 959 1157 2209 
+948     13      3051    1 3 5 15 23 31 31 81 85 33 785 2639 7799 
+949     13      3054    1 1 5 13 21 3 47 99 235 943 1731 2467 7891 
+950     13      3056    1 1 1 3 17 53 85 219 73 131 1339 875 1191 
+951     13      3065    1 1 5 7 17 63 113 7 185 557 749 3563 4973 
+952     13      3073    1 3 3 15 15 21 43 111 155 689 345 423 3597 
+953     13      3074    1 1 5 1 15 29 93 5 361 713 695 3937 425 
+954     13      3083    1 3 7 7 13 41 115 175 315 937 123 2841 4457 
+955     13      3086    1 1 3 11 25 5 103 53 423 811 657 399 7257 
+956     13      3091    1 1 1 1 1 13 101 211 383 325 97 1703 4429 
+957     13      3097    1 3 7 9 31 45 83 157 509 701 841 1105 3643 
+958     13      3109    1 1 1 7 1 9 69 17 129 281 1161 2945 7693 
+959     13      3116    1 3 7 1 11 29 51 143 77 433 1723 2317 5641 
+960     13      3124    1 1 1 1 21 43 13 67 177 505 1629 1267 4885 
+961     13      3128    1 1 3 11 27 63 111 47 233 781 453 1679 3209 
+962     13      3153    1 1 3 13 29 27 119 141 493 971 461 1159 633 
+963     13      3160    1 1 3 15 23 5 79 215 163 149 1805 2399 61 
+964     13      3165    1 3 5 13 19 5 1 39 409 561 709 829 1357 
+965     13      3172    1 3 3 13 19 43 9 177 449 447 73 2107 5669 
+966     13      3175    1 3 5 1 23 13 63 109 203 593 829 4017 6881 
+967     13      3184    1 1 5 7 3 9 53 175 391 169 1283 3793 4451 
+968     13      3193    1 1 5 7 29 43 9 5 209 77 927 2941 8145 
+969     13      3196    1 3 5 15 17 49 5 143 131 771 1685 925 2175 
+970     13      3200    1 1 3 11 27 27 27 159 161 1015 1587 4049 1983 
+971     13      3203    1 3 1 3 23 57 119 67 481 577 389 3319 5325 
+972     13      3205    1 3 5 1 19 39 87 61 329 657 1773 31 1707 
+973     13      3209    1 1 3 1 5 25 15 241 131 815 1751 3029 8039 
+974     13      3224    1 3 3 13 27 13 77 87 437 57 621 1031 7891 
+975     13      3239    1 3 1 13 23 51 117 37 331 745 605 3179 4713 
+976     13      3251    1 1 5 5 19 17 99 167 87 721 737 789 2165 
+977     13      3254    1 3 5 13 1 51 119 211 165 299 1327 3053 3343 
+978     13      3265    1 1 5 15 29 45 17 129 67 345 1553 2705 7369 
+979     13      3266    1 1 1 9 23 7 13 209 7 407 317 3077 7287 
+980     13      3275    1 1 1 5 9 59 89 3 487 451 505 2499 7563 
+981     13      3280    1 3 1 7 21 1 21 203 101 417 1389 2751 1397 
+982     13      3283    1 3 7 13 7 31 3 247 349 485 1259 549 6321 
+983     13      3286    1 1 7 7 27 33 107 197 293 729 1753 2571 103 
+984     13      3301    1 3 5 9 25 35 5 253 137 213 2041 3387 1809 
+985     13      3302    1 1 7 13 15 35 67 83 295 175 839 2831 839 
+986     13      3305    1 3 3 11 3 17 55 141 247 991 117 3799 1221 
+987     13      3319    1 1 5 1 11 37 87 233 457 653 899 2933 3105 
+988     13      3323    1 1 3 15 3 31 67 167 437 9 651 1109 1139 
+989     13      3326    1 1 3 1 7 63 67 17 11 883 1855 1941 4751 
+990     13      3331    1 3 7 9 19 33 113 117 495 39 1795 2561 5519 
+991     13      3348    1 1 7 5 1 3 103 37 201 223 1101 877 6483 
+992     13      3351    1 1 5 9 29 49 51 33 439 917 861 1321 2135 
+993     13      3358    1 1 3 3 1 5 17 93 217 619 613 1357 6095 
+994     13      3368    1 3 1 11 3 21 5 41 15 175 843 2937 6849 
+995     13      3374    1 3 3 7 9 57 55 127 79 287 445 2205 7989 
+996     13      3376    1 1 7 13 23 17 93 129 157 135 1747 1813 4183 
+997     13      3379    1 1 1 5 31 59 99 33 425 329 887 367 1761 
+998     13      3385    1 1 7 9 17 53 77 139 435 387 49 3649 1773 
+999     13      3386    1 3 3 15 21 57 45 161 331 719 273 3479 4173 
+1000    13      3396    1 1 3 9 3 3 105 201 373 877 919 1263 6649 

Added: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/random/SobolSequenceGeneratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/random/SobolSequenceGeneratorTest.java?rev=1481558&view=auto
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/random/SobolSequenceGeneratorTest.java (added)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/random/SobolSequenceGeneratorTest.java Sun May 12 14:00:06 2013
@@ -0,0 +1,107 @@
+/*
+ * 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.math3.random;
+
+import static org.junit.Assert.*;
+
+import java.io.InputStream;
+
+import org.apache.commons.math3.exception.OutOfRangeException;
+import org.junit.Before;
+import org.junit.Test;
+
+public class SobolSequenceGeneratorTest {
+
+    private double[][] referenceValues = {
+            { 0.0, 0.0, 0.0 },
+            { 0.5, 0.5, 0.5 },
+            { 0.75, 0.25, 0.25 },
+            { 0.25, 0.75, 0.75 },
+            { 0.375, 0.375, 0.625 },
+            { 0.875, 0.875, 0.125 },
+            { 0.625, 0.125, 0.875 },
+            { 0.125, 0.625, 0.375 },
+            { 0.1875, 0.3125, 0.9375 },
+            { 0.6875, 0.8125, 0.4375 }
+    };
+
+    private SobolSequenceGenerator generator;
+
+    @Before
+    public void setUp() {
+        generator = new SobolSequenceGenerator(3);
+    }
+
+    @Test
+    public void test3DReference() {
+        for (int i = 0; i < referenceValues.length; i++) {
+            double[] result = generator.nextVector();
+            assertArrayEquals(referenceValues[i], result, 1e-6);
+            assertEquals(i + 1, generator.getNextIndex());
+        }
+    }
+    
+    @Test
+    public void testConstructor() {
+        try {
+            new SobolSequenceGenerator(0);
+            fail();
+        } catch (OutOfRangeException e) {
+            // expected
+        }
+        
+        try {
+            new SobolSequenceGenerator(1001);
+            fail();
+        } catch (OutOfRangeException e) {
+            // expected
+        }
+    }
+
+    @Test
+    public void testConstructor2() throws Exception{
+        try {
+            final String RESOURCE_NAME = "/assets/org/apache/commons/math3/random/new-joe-kuo-6.1000";
+            final InputStream is = getClass().getResourceAsStream(RESOURCE_NAME);
+            new SobolSequenceGenerator(1001, is);
+            fail();
+        } catch (OutOfRangeException e) {
+            // expected
+        }
+        
+        try {
+            new SobolSequenceGenerator(1001);
+            fail();
+        } catch (OutOfRangeException e) {
+            // expected
+        }
+    }
+
+    @Test
+    public void testSkip() {
+        double[] result = generator.skipTo(5);
+        assertArrayEquals(referenceValues[5], result, 1e-6);
+        assertEquals(6, generator.getNextIndex());
+        
+        for (int i = 6; i < referenceValues.length; i++) {
+            result = generator.nextVector();
+            assertArrayEquals(referenceValues[i], result, 1e-6);
+            assertEquals(i + 1, generator.getNextIndex());
+        }
+    }
+
+}

Propchange: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/random/SobolSequenceGeneratorTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/random/SobolSequenceGeneratorTest.java
------------------------------------------------------------------------------
    svn:keywords = Id Revision HeadURL

Propchange: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/random/SobolSequenceGeneratorTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message