public final class Sequences extends Object
| Modifier and Type | Method and Description |
|---|---|
static Producer<Long> |
linearCongruentialGenerator(long seed,
long m,
long a,
long c)
|
static Producer<Long> |
multiplicativeCongruentialGenerator(long seed,
long m,
long a)
|
static Producer<Long> |
randomSequence(long period)
Produces a periodic sequence of random, but unique
Longs with values ranging from 0 to period -
1. |
static Producer<Long> |
randomSequence(long seed,
long period)
Produces a periodic sequence of random, but unique
Longs with values ranging from 0 to period -
1. |
static Producer<Long> |
randomSequence(long seed,
long min,
long max)
Produces a periodic sequence of random, but unique
Longs with values ranging from min to
max- 1. |
public static Producer<Long> randomSequence(long period)
Longs with values ranging from 0 to period -
1.public static Producer<Long> randomSequence(long seed, long period)
Longs with values ranging from 0 to period -
1. For identical seeds, the returned sequences will be identical.public static Producer<Long> randomSequence(long seed, long min, long max)
Longs with values ranging from min to
max- 1. The period of the sequence is max - min. For identical seeds, the
returned sequences will be identical.public static Producer<Long> linearCongruentialGenerator(long seed, long m, long a, long c)
public static Producer<Long> multiplicativeCongruentialGenerator(long seed, long m, long a)
Copyright © 2018 Arno Unkrig. All rights reserved.