예제 #1
0
        /// <summary>
        /// Creates a chain of transpositions, that includes the initial transposition
        /// </summary>
        /// <param name="s0">The leading transposition</param>
        /// <param name="len">The length of the chain</param>
        public static SwapG <T>[] Chain(SwapG <T> s0, int len)
        {
            var dst = new SwapG <T> [len];

            dst[0] = s0;
            for (var k = 1; k < len; k++)
            {
                dst[k] = ++s0;
            }
            return(dst);
        }