Skip to content

Commit

Permalink
Increased dimension of directions numbers in Sobol sequence generation.
Browse files Browse the repository at this point in the history
Fixes #360
  • Loading branch information
maisonobe committed Dec 17, 2024
1 parent 3703d65 commit 01a2808
Show file tree
Hide file tree
Showing 6 changed files with 21,223 additions and 1,009 deletions.
3 changes: 3 additions & 0 deletions hipparchus-core/src/changes/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ If the output is not quite correct, check for invisible trailing spaces!
</properties>
<body>
<release version="4.0" date="TBD" description="TBD">
<action dev="luc" type="fix" issue="issuers/360">
Increased dimension of directions numbers in Sobol sequence generation.
</action>
<action dev="luc" type="fix" issue="issues/354">
Added FieldBivariateGridInterpolator, FieldBilinearInterpolator and FieldBilinearInterpolatingFunction.
</action>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* 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
* The implementation already comes with support for up to 21201 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:
Expand All @@ -66,10 +66,10 @@ public class SobolSequenceGenerator implements RandomVectorGenerator {
private static final double SCALE = FastMath.pow(2, BITS);

/** The maximum supported space dimension. */
private static final int MAX_DIMENSION = 1000;
private static final int MAX_DIMENSION = 21201;

/** The resource containing the direction numbers. */
private static final String RESOURCE_NAME = "/assets/org/hipparchus/random/new-joe-kuo-6.1000";
private static final String RESOURCE_NAME = "/assets/org/hipparchus/random/new-joe-kuo-6.21201";

/** Character set for file input. */
private static final String FILE_CHARSET = "US-ASCII";
Expand Down Expand Up @@ -179,7 +179,7 @@ private int initFromStream(final InputStream is) throws MathIllegalStateExceptio

// special case: dimension 1 -> use unit initialization
for (int i = 1; i <= BITS; i++) {
direction[0][i] = 1l << (BITS - i);
direction[0][i] = 1L << (BITS - i);
}

final Charset charset = Charset.forName(FILE_CHARSET);
Expand Down
Loading

0 comments on commit 01a2808

Please sign in to comment.