//Групповая операция
        public static NPermutation operator *(NPermutation a, NPermutation b)
        {
            NPermutation perm = new NPermutation(a.Count);

            for (int i = 0; i < a.Count; i++)
            {
                perm.PermutationNumbers.Add(a[b[i]]);
            }
            return(perm);
        }
        //Обращение (возведение в степень -1)
        internal NPermutation RevPerm()
        {
            NPermutation tperm = new NPermutation();

            for (int ar = 0; ar < this.Count; ar++)
            {
                int b1 = this.PermutationNumbers.IndexOf(ar);
                tperm.PermutationNumbers.Add(b1);
            }
            return(tperm);
        }
Exemple #3
0
        public static NPermutation T(int k, NPermutation p)
        {
            NPermutation outp = new NPermutation();

            outp.Add(p[k]);
            for (int i = 1; i <= k; i++)
            {
                outp.Add(p[i - 1]);
            }
            for (int i = k + 1; i < p.Count; i++)
            {
                outp.Add(p[i]);
            }
            return(outp);
        }
Exemple #4
0
 public NFSnElement(int num, NPermutation per)
 {
     this._FElement  = num;
     this._SnElement = per;
 }