30 Selector(229, 17, 0x10000),
81 [NUMBER_OF_GENERATORS + 1]) noexcept
83 register unsigned int Index;
105 [NUMBER_OF_GENERATORS + 1]) const noexcept
107 register unsigned int Index;
110 Seed [Index + 1] =
Generator [Index].GetValue();
130 register unsigned int Index;
132 for (Index = 0; Index < NUMBER_OF_GENERATORS; ++Index)
133 Generator [Index].SetSeed(Generator [Index].GetValue() ^ Value);
134 Selector.SetSeed(Selector.GetValue() ^ Value);
163 return Generator [Selector.Generate(NUMBER_OF_GENERATORS - 1)].
196 Probability,
unsigned int Elements) noexcept
198 register uint_fast32_t Value;
199 register const uint_fast32_t* Pointer;
202 Pointer = Probability + Elements;
203 while (Probability < Pointer)
204 Value += *Probability++;
207 Value = Generate(Value - 1);
208 Pointer = Probability -= Elements;
211 if (Value < *Probability)
212 return static_cast<unsigned int>(Probability - Pointer);
213 Value -= *Probability++;