public interface SkippingRandomness extends RandomnessSource
Modifier and Type | Method and Description |
---|---|
long |
skip(long advance)
Advances or rolls back the SkippingRandomness' state without actually generating each number.
|
copy, next, nextLong
long skip(long advance)
RandomnessSource.nextLong()
,
and returns the random number produced at that step. Negative numbers can be used to step backward, or 0 can be
given to get the most-recently-generated long from RandomnessSource.nextLong()
.advance
- Number of future generations to skip over; can be negative to backtrack, 0 gets the most-recently-generated numberadvance
numbersCopyright © Eben Howard 2012–2022. All rights reserved.