samyBadjoudj commented on a change in pull request #190: URL: https://github.com/apache/commons-math/pull/190#discussion_r664255905
########## File path: commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/quasirandom/SobolSequenceGeneratorTest.java ########## @@ -92,16 +92,29 @@ public void testConstructor2() throws Exception{ } @Test - public void testSkip() { - double[] result = generator.skipTo(5); + public void testJump() { + LowDiscrepancySequence copyOfSeq = generator.jump(5); + double[] result = copyOfSeq.get(); Assert.assertArrayEquals(referenceValues[5], result, 1e-6); - Assert.assertEquals(6, generator.getNextIndex()); for (int i = 6; i < referenceValues.length; i++) { - result = generator.get(); + result = copyOfSeq.get(); Assert.assertArrayEquals(referenceValues[i], result, 1e-6); - Assert.assertEquals(i + 1, generator.getNextIndex()); } } + @Test(expected = NotPositiveException.class) + public void testJumpNegativeIndex() { + LowDiscrepancySequence copyOfSeq = generator.jump(-5); + + } + + + @Test + public void testFirstSupplying() { + LowDiscrepancySequence sequence = new SobolSequenceGenerator(3); + Assert.assertArrayEquals(new double[]{0.0, 0.0, 0.0}, sequence.get(),1e-6); + Review comment: done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org