// Allows to vary the order by supplying a seed
//
// We add the seed to every LSFR value generated, and also start
// the LSFR with the seed.
sclass WeightlessShuffledIteratorWithSeed extends WeightlessShuffledIterator {
final int mask, seed;
*(L list) {
this(list, 0);
}
*(L list, int *seed) {
super(list);
if (lsfr == null) ret with mask = 0;
lsfr.start(seed);
mask = (1 << bits())-1;
}
int postProcessLSFRValue(int i) { ret (i+seed) & mask; }
}