[
https://issues.apache.org/jira/browse/MATH-826?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13652843#comment-13652843
]
Luc Maisonobe commented on MATH-826:
------------------------------------
You are right, we could reduce the file to say dimension 1000 which is slightly
above 60 kilobytes. Letting the user provide custom directions is a good idea.
I also wonder if we should not use more bits for double generation. 32 bits
seems small to me. In the BitStreamGenerator we use 52 bits as follows:
{code}
public double nextDouble() {
final long high = ((long) next(26)) << 26;
final int low = next(26);
return (high | low) * 0x1.0p-52d;
}
{code}
It seemed to me Sobol sequences can generate almost arbitrary number of bits.
Could we set it up so it generates 52 bits and then multiply by the same
constant 0x1.0p-52d?
Another point is that there are two ways to generate the sequence. The fast one
you used which is based on Gray code and hence is a simple recursive operation
(x = x ^ direction[c]), and a direct one which can generate any number in the
sequence from its index. We could perhaps propose another method skipTo(int
index) that would use the longer method and reinitialize x from this point.
Users could then use skipTo to go anywhere they want in the sequence, and then
they would retrieve consecutive vectors starting from there. The use cases for
such a method are:
* drop the first 2^n points, as some people think it is better (but Joe Kuo
does not seem to agree as shown in his notes)
* allow user to generate different sequences, by changing the start point
* implement a poor-man seed setting, the pseudo-seed being the start index
> RFE: low discrepancy sequence generator
> ---------------------------------------
>
> Key: MATH-826
> URL: https://issues.apache.org/jira/browse/MATH-826
> Project: Commons Math
> Issue Type: Wish
> Reporter: Sam Halliday
> Priority: Minor
> Labels: features
> Attachments: SobolSequenceRandomGenerator.java
>
>
> Please provide a low discrepancy sequence random number generator.
> http://en.wikipedia.org/wiki/Low-discrepancy_sequence
> Support for such a generator is poor in Java and existing implementations
> tend to be standalone and do not provide a user friendly API. Ideally, such a
> generator would implement Random, but using the Apache Commons Math random
> API would be acceptable.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira