-
Notifications
You must be signed in to change notification settings - Fork 360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MATH-1597: LowDiscrepancySequence supplier/jump for Halton and Sobol #190
base: master
Are you sure you want to change the base?
Conversation
public void testFirstSupplying() { | ||
LowDiscrepancySequence sequence = new SobolSequenceGenerator(3); | ||
Assert.assertArrayEquals(new double[]{0.0, 0.0, 0.0}, sequence.get(),1e-6); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this newline
@Test(expected = NotPositiveException.class) | ||
public void testJumpNegativeIndex() { | ||
LowDiscrepancySequence copyOfSeq = generator.jump(-5); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this newline
public void testFirstSupplying() { | ||
LowDiscrepancySequence sequence = new HaltonSequenceGenerator(3); | ||
Assert.assertArrayEquals(new double[]{0.0, 0.0, 0.0}, sequence.get(),1e-6); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this newline
@Test(expected = NotPositiveException.class) | ||
public void testJumpNegativeIndex() { | ||
LowDiscrepancySequence copyOfSeq = generator.jump(-5); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this newline
d85675f
to
0412ad3
Compare
done |
4ec560c
to
187bd46
Compare
check styles fixed |
|
||
|
||
|
||
@Test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please remove these 2 extra lines as well
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra line
* @return the i-th point in the Halton sequence | ||
* @throws org.apache.commons.math4.legacy.exception.NotPositiveException NotPositiveException if index < 0 | ||
* @return the copy of this sequence | ||
* @throws NotPositiveException if index < 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can give the reference to the exception class as well org.apache.commons.math4.legacy.exception.NotPositiveException
return weight != null ? (weight[i] * digit) % b : digit; | ||
} | ||
|
||
/** | ||
* Skip to the i-th point in the Halton sequence. | ||
* jump to the i-th point in the Halton sequence. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make the J
capital
187bd46
to
e7a8977
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
e7a8977
to
ac65dca
Compare
No description provided.