This is an automated email from the ASF dual-hosted git repository.
ggregory 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 b0d413ba Normalize spelling to US English
b0d413ba is described below
commit b0d413bad5cb785377fdecf932bd5130836dd26d
Author: Gary Gregory <[email protected]>
AuthorDate: Tue Oct 31 06:20:54 2023 -0400
Normalize spelling to US English
---
.../rng/core/JumpableProvidersParametricTest.java | 2 +-
.../commons/rng/examples/stress/RNGUtils.java | 30 ++++++++++++++--------
.../rng/examples/stress/ResultsCommand.java | 2 +-
.../rng/simple/internal/NativeSeedType.java | 10 ++++----
4 files changed, 26 insertions(+), 18 deletions(-)
diff --git
a/commons-rng-core/src/test/java/org/apache/commons/rng/core/JumpableProvidersParametricTest.java
b/commons-rng-core/src/test/java/org/apache/commons/rng/core/JumpableProvidersParametricTest.java
index f96f63a8..8b35f84f 100644
---
a/commons-rng-core/src/test/java/org/apache/commons/rng/core/JumpableProvidersParametricTest.java
+++
b/commons-rng-core/src/test/java/org/apache/commons/rng/core/JumpableProvidersParametricTest.java
@@ -150,7 +150,7 @@ class JumpableProvidersParametricTest {
generator.nextBoolean();
final RandomProviderState preJumpState =
((RestorableUniformRandomProvider) generator).saveState();
- Assumptions.assumeTrue(preJumpState instanceof
RandomProviderDefaultState, "Not a recognised state");
+ Assumptions.assumeTrue(preJumpState instanceof
RandomProviderDefaultState, "Not a recognized state");
final UniformRandomProvider copy = jumpFunction.jump();
diff --git
a/commons-rng-examples/examples-stress/src/main/java/org/apache/commons/rng/examples/stress/RNGUtils.java
b/commons-rng-examples/examples-stress/src/main/java/org/apache/commons/rng/examples/stress/RNGUtils.java
index 0454a0ab..39d0e491 100644
---
a/commons-rng-examples/examples-stress/src/main/java/org/apache/commons/rng/examples/stress/RNGUtils.java
+++
b/commons-rng-examples/examples-stress/src/main/java/org/apache/commons/rng/examples/stress/RNGUtils.java
@@ -31,20 +31,28 @@ import java.util.concurrent.ThreadLocalRandom;
* Utility methods for a {@link UniformRandomProvider}.
*/
final class RNGUtils {
+
/** Name prefix for bit-reversed RNGs. */
private static final String BYTE_REVERSED = "Byte-reversed ";
+
/** Name prefix for bit-reversed RNGs. */
private static final String BIT_REVERSED = "Bit-reversed ";
+
/** Name prefix for hash code mixed RNGs. */
private static final String HASH_CODE = "HashCode ^ ";
+
/** Name prefix for ThreadLocalRandom xor mixed RNGs. */
private static final String TLR_MIXED = "ThreadLocalRandom ^ ";
+
/** Name of xor operator for xor mixed RNGs. */
private static final String XOR = " ^ ";
- /** Message for an unrecognised source64 mode. */
- private static final String UNRECOGNISED_SOURCE_64_MODE = "Unrecognised
source64 mode: ";
- /** Message for an unrecognised native output type. */
- private static final String UNRECOGNISED_NATIVE_TYPE = "Unrecognised
native output type: ";
+
+ /** Message for an unrecognized source64 mode. */
+ private static final String UNRECOGNISED_SOURCE_64_MODE = "Unrecognized
source64 mode: ";
+
+ /** Message for an unrecognized native output type. */
+ private static final String UNRECOGNISED_NATIVE_TYPE = "Unrecognized
native output type: ";
+
/** The source64 mode for the default LongProvider caching implementation.
*/
private static final Source64Mode SOURCE_64_DEFAULT = Source64Mode.LO_HI;
@@ -67,7 +75,7 @@ final class RNGUtils {
*
* @param rng The random generator.
* @return the byte reversed random generator.
- * @throws ApplicationException If the input source native type is not
recognised.
+ * @throws ApplicationException If the input source native type is not
recognized.
* @see Integer#reverseBytes(int)
* @see Long#reverseBytes(long)
*/
@@ -108,7 +116,7 @@ final class RNGUtils {
*
* @param rng The random generator.
* @return the bit reversed random generator.
- * @throws ApplicationException If the input source native type is not
recognised.
+ * @throws ApplicationException If the input source native type is not
recognized.
* @see Integer#reverse(int)
* @see Long#reverse(long)
*/
@@ -329,7 +337,7 @@ final class RNGUtils {
*
* @param rng The random generator.
* @return the combined random generator.
- * @throws ApplicationException If the input source native type is not
recognised.
+ * @throws ApplicationException If the input source native type is not
recognized.
* @see System#identityHashCode(Object)
*/
static UniformRandomProvider createHashCodeProvider(final
UniformRandomProvider rng) {
@@ -377,7 +385,7 @@ final class RNGUtils {
*
* @param rng The random generator.
* @return the combined random generator.
- * @throws ApplicationException If the input source native type is not
recognised.
+ * @throws ApplicationException If the input source native type is not
recognized.
*/
static UniformRandomProvider createThreadLocalRandomProvider(final
UniformRandomProvider rng) {
if (rng instanceof RandomIntSource) {
@@ -423,7 +431,7 @@ final class RNGUtils {
* @param rng1 The first random generator.
* @param rng2 The second random generator.
* @return the combined random generator.
- * @throws ApplicationException If the input source native type is not
recognised.
+ * @throws ApplicationException If the input source native type is not
recognized.
*/
static UniformRandomProvider createXorProvider(final UniformRandomProvider
rng1,
final UniformRandomProvider rng2) {
@@ -497,7 +505,7 @@ final class RNGUtils {
* @param byteSize Number of bytes values to write.
* @param byteOrder Byte order.
* @return the data output
- * @throws ApplicationException If the input source native type is not
recognised; or if
+ * @throws ApplicationException If the input source native type is not
recognized; or if
* the mode for a RandomLongSource is not one of: raw; hi-lo; or lo-hi.
*/
static RngDataOutput createDataOutput(final UniformRandomProvider rng,
Source64Mode source64,
@@ -533,7 +541,7 @@ final class RNGUtils {
*
* @param argument the argument
* @return the object
- * @throws ApplicationException If the argument is not recognised
+ * @throws ApplicationException If the argument is not recognized
*/
static Object parseArgument(String argument) {
try {
diff --git
a/commons-rng-examples/examples-stress/src/main/java/org/apache/commons/rng/examples/stress/ResultsCommand.java
b/commons-rng-examples/examples-stress/src/main/java/org/apache/commons/rng/examples/stress/ResultsCommand.java
index 0bf079ef..d874b134 100644
---
a/commons-rng-examples/examples-stress/src/main/java/org/apache/commons/rng/examples/stress/ResultsCommand.java
+++
b/commons-rng-examples/examples-stress/src/main/java/org/apache/commons/rng/examples/stress/ResultsCommand.java
@@ -591,7 +591,7 @@ class ResultsCommand implements Callable<Void> {
/**
* Gets the test format from the output. This scans the stdout produced by
a test application.
- * If it is not recognised this may be a valid partial result or an
unknown result. Throw
+ * If it is not recognized this may be a valid partial result or an
unknown result. Throw
* an exception if not allowing partial results, otherwise log an error.
*
* @param resultFile Result file (for the exception message).
diff --git
a/commons-rng-simple/src/main/java/org/apache/commons/rng/simple/internal/NativeSeedType.java
b/commons-rng-simple/src/main/java/org/apache/commons/rng/simple/internal/NativeSeedType.java
index 231e2db0..e716896c 100644
---
a/commons-rng-simple/src/main/java/org/apache/commons/rng/simple/internal/NativeSeedType.java
+++
b/commons-rng-simple/src/main/java/org/apache/commons/rng/simple/internal/NativeSeedType.java
@@ -165,7 +165,7 @@ public enum NativeSeedType {
}
};
- /** Error message for unrecognised seed types. */
+ /** Error message for unrecognized seed types. */
private static final String UNRECOGNISED_SEED = "Unrecognized seed type: ";
/** Maximum length of the seed array (for creating array seeds). */
private static final int RANDOM_SEED_ARRAY_SIZE = 128;
@@ -261,7 +261,7 @@ public enum NativeSeedType {
return convert((byte[]) seed, size);
}
- throw new UnsupportedOperationException(unrecognisedSeedMessage(seed));
+ throw new UnsupportedOperationException(unrecognizedSeedMessage(seed));
}
/**
@@ -329,16 +329,16 @@ public enum NativeSeedType {
return (byte[]) seed;
}
- throw new UnsupportedOperationException(unrecognisedSeedMessage(seed));
+ throw new UnsupportedOperationException(unrecognizedSeedMessage(seed));
}
/**
- * Create an unrecognised seed message. This will add the class type of
the seed.
+ * Create an unrecognized seed message. This will add the class type of
the seed.
*
* @param seed the seed
* @return the message
*/
- private static String unrecognisedSeedMessage(Object seed) {
+ private static String unrecognizedSeedMessage(Object seed) {
return UNRECOGNISED_SEED + ((seed == null) ? "null" :
seed.getClass().getName());
}
}