Beispiel #1
0
        public static IEnumerable <uint> GetSeedsFromIVsSkip(RNG method, uint rand1, uint rand3)
        {
            Debug.Assert(rand1 >> 15 == 0);
            Debug.Assert(rand3 >> 15 == 0);
            rand1 <<= 16;
            rand3 <<= 16;
            var seeds = method.RecoverLower16BitsGap(rand1, rand3)
                        .Concat(method.RecoverLower16BitsGap(rand1, rand3 ^ 0x80000000));

            foreach (var z in seeds)
            {
                yield return(z);

                yield return(z ^ 0x80000000); // sister bitflip
            }
        }
Beispiel #2
0
        private static IEnumerable <uint> GetSeedsFromPIDSkip(RNG method, uint a, uint b)
        {
            Debug.Assert(a >> 16 == 0);
            Debug.Assert(b >> 16 == 0);
            uint third = a << 16;
            uint first = b << 16;

            return(method.RecoverLower16BitsGap(first, third));
        }