Пример #1
0
        public static uint[] ToSingleTwoCycleArray(this IRando rando, uint order)
        {
            var pair = new uint[2];
            var id   = 0u.CountUp(order).ToArray();

            rando.SelectWithoutReplacement(id, pair);
            id[pair[0]] = pair[1];
            id[pair[1]] = pair[0];

            return(id);
        }