Class SeedUtils.UnsignedByteProvider
- java.lang.Object
-
- org.apache.commons.rng.simple.internal.SeedUtils.UnsignedByteProvider
-
- Enclosing class:
- SeedUtils
private static class SeedUtils.UnsignedByteProvider extends java.lang.Object
Provider of unsigned 8-bit integers.
-
-
Field Summary
Fields Modifier and Type Field Description private int
bits
The current 32-bits of randomness.private int
counter
The counter tracking the bits to extract.private static int
MASK_2_BITS
Mask to extract the lowest 2 bits from an integer.private static int
MASK_8_BITS
Mask to extract the lowest 8 bits from an integer.private UniformRandomProvider
rng
Source of randomness.
-
Constructor Summary
Constructors Constructor Description UnsignedByteProvider(UniformRandomProvider rng)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) int
nextUnsignedByte()
Return the next unsigned byte.
-
-
-
Field Detail
-
MASK_2_BITS
private static final int MASK_2_BITS
Mask to extract the lowest 2 bits from an integer.- See Also:
- Constant Field Values
-
MASK_8_BITS
private static final int MASK_8_BITS
Mask to extract the lowest 8 bits from an integer.- See Also:
- Constant Field Values
-
rng
private final UniformRandomProvider rng
Source of randomness.
-
bits
private int bits
The current 32-bits of randomness.
-
counter
private int counter
The counter tracking the bits to extract.
-
-
Constructor Detail
-
UnsignedByteProvider
UnsignedByteProvider(UniformRandomProvider rng)
- Parameters:
rng
- Source of randomness.
-
-