You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2019/06/06 15:20:02 UTC
[commons-rng] branch master updated: Revert "RNG-75: Use
SplitMix64.next()"
This is an automated email from the ASF dual-hosted git repository.
aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-rng.git
The following commit(s) were added to refs/heads/master by this push:
new 5b4a401 Revert "RNG-75: Use SplitMix64.next()"
5b4a401 is described below
commit 5b4a401f47d38eaf401078727e1e0c9d9b6a938a
Author: aherbert <ah...@apache.org>
AuthorDate: Thu Jun 6 16:17:44 2019 +0100
Revert "RNG-75: Use SplitMix64.next()"
This reverts commit aa246979feb8c880c60c972faf7c9ffb9174f4cd.
If the generator is changed in the future to an IntProvider then next() will output an integer and not a long.
---
.../java/org/apache/commons/rng/simple/internal/Long2IntArray.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/commons-rng-simple/src/main/java/org/apache/commons/rng/simple/internal/Long2IntArray.java b/commons-rng-simple/src/main/java/org/apache/commons/rng/simple/internal/Long2IntArray.java
index 700be7a..0e161fe 100644
--- a/commons-rng-simple/src/main/java/org/apache/commons/rng/simple/internal/Long2IntArray.java
+++ b/commons-rng-simple/src/main/java/org/apache/commons/rng/simple/internal/Long2IntArray.java
@@ -66,11 +66,11 @@ public class Long2IntArray implements Seed2ArrayConverter<Long, int[]> {
int i = 0;
// Handle an odd size
if ((size & 1) == 1) {
- out[i++] = NumberFactory.extractHi(rng.next());
+ out[i++] = NumberFactory.extractHi(rng.nextLong());
}
// Fill the remaining pairs
while (i < size) {
- final long v = rng.next();
+ final long v = rng.nextLong();
out[i] = NumberFactory.extractHi(v);
out[i + 1] = NumberFactory.extractLo(v);
i += 2;