public static CompositeDictionary <IPermutation, int> GetOrbit( this IPermutation perm, uint maxSize = 1000) { var pd = PermutationEx.PermutationDictionary(perm.Order); var cume = perm; for (var i = 0; i < maxSize; i++) { if (pd.ContainsKey(cume)) { return(pd); } pd.Add(cume, 1); cume = cume.Multiply(perm); } return(pd); }
public static CompositeDictionary <IPermutation, int> GetConjOrbit( this IPermutation perm, IPermutation conj, uint maxSize = 1000) { var pd = PermutationEx.PermutationDictionary(perm.Order); var curConj = conj; var curRes = perm; for (var i = 0; i < maxSize; i++) { if (pd.ContainsKey(curRes)) { return(pd); } pd.Add(curRes, 1); curRes = perm.ConjugateBy(curConj); curConj = curConj.Multiply(conj); } return(pd); }