コード例 #1
0
        public byte[] GetRandomT(int arrayLength)
        {
            var p           = _p.ToArray();
            var length      = p.Length;
            var randomArray = new byte[arrayLength];
            var bytes       = _xorShift.GetBytes(arrayLength);

            for (var i = 0; i < arrayLength; i++)
            {
                var b = bytes[i];
                for (byte j = 0; j < length; j++)
                {
                    if (b > p[j])
                    {
                        continue;
                    }
                    randomArray[i] = j;
                    break;
                }
            }

            return(randomArray);
        }