public static List <BasElem> TranslateEdTauToBasElems(STTableau tab) { int n = tab.Number + 1; FileStream v = File.OpenRead(n.ToString() + ".bas"); BinaryFormatter b = new BinaryFormatter(); Basis bhigh = (Basis)b.Deserialize(v); v.Close(); return(TranslateEdTauToBasElems(tab, bhigh)); }
private static List <BasElem> TranslateEdTauToBasElems(STTableau tab, Basis bhigh) { FSnCollection Sym = tab.YoungSymmetrizer(); foreach (FSnElement fse in Sym) { fse.SnElement = fse.SnElement * tab.Numeration.RevPerm(); fse.SnElement.Add(bhigh.Number); } FromFSnCollectionToTXTFile(Sym, bhigh); UmfpackSolve(); return(FromTXTFileToBasElems(bhigh)); }
public readonly int MatrixNum; //нумерация с нуля public BasElem(Basis bas, int poss, Fraction coeff) { int pos = poss + 1; Coeff = coeff; int sum = 0; if (pos == Common.Factorial(bas.Number)) { Sigma = new STTableau(bas.SaveTabGroups[bas.SaveTabGroups.Count - 1].TabGroupNumerations[0], bas.SaveTabGroups[bas.SaveTabGroups.Count - 1].TabGroupPartition); Tau = Sigma; MatrixNum = bas.SaveTabGroups.Count - 1; SigmaInt = 1; TauInt = 1; return; } if (pos == 1) { Sigma = new STTableau(bas.SaveTabGroups[0].TabGroupNumerations[0], bas.SaveTabGroups[0].TabGroupPartition); TauInt = 1; SigmaInt = 1; Tau = Sigma; return; } for (int i = 0; i < (int)bas.SaveTabGroups.Count - 1; i++) { int current = bas.SaveTabGroups[i].TabGroupNumerations.Count; int next = bas.SaveTabGroups[i + 1].TabGroupNumerations.Count; sum += current * current; if ((pos > sum) && (pos <= sum + next * next)) { int pos1 = pos - sum; if (pos1 % next == 0) { TauInt = next; SigmaInt = pos1 / next; } else { SigmaInt = 1 + pos1 / next; TauInt = pos1 % (next); } Sigma = new STTableau(bas.SaveTabGroups[i + 1].TabGroupNumerations[SigmaInt - 1], bas.SaveTabGroups[i + 1].TabGroupPartition); Tau = new STTableau(bas.SaveTabGroups[i + 1].TabGroupNumerations[TauInt - 1], bas.SaveTabGroups[i + 1].TabGroupPartition); MatrixNum = i + 1; break; } } }
public static List <YTFClass> FindTabInYTF(Basis bas, STTableau t) { FileStream v = File.OpenRead(bas.Number.ToString() + ".ytf"); BinaryFormatter b = new BinaryFormatter(); List <YTFClass> ytf = (List <YTFClass>)b.Deserialize(v); v.Close(); List <YTFClass> result = new List <YTFClass>(); foreach (YTFClass item in ytf) { if (item.Tab.Equ(t)) { result.Add(item); } } return(result); }
public YTFClass(STTableau t, List <BasElem> bl) { Tab = t; BasElemList = bl; }
//Построение (сортированного по нумерациям) списка диаграмма-нумерации SaveTabGroups internal void Core() { order = Common.GeneratePermutations(this.number); //оставляем только инволюции List <Permutation> Involutions = new List <Permutation>(); for (int i = 0; i < this.order.Count; i++) { if (this.order[i].IsInvolution()) { Involutions.Add(this.order[i]); } } //генерация разбиений List <Partition> Partitions = Common.GeneratePartitions(this.number); for (int i = 0; i < Partitions.Count; i++) { SaveTabGroups.Add(new TabSet(Partitions[i])); } //алгоритм вставки Шенстеда и запись в SaveTabGroups for (int i = 0; i < (int)Involutions.Count; i++) { STTableau tab = new STTableau(Involutions[i]); for (int j = 0; j < (int)Partitions.Count; j++) { if (tab.DiagElemRow == SaveTabGroups[j].TabGroupPartition) { SaveTabGroups[j].TabGroupNumerations.Add(tab.Numeration); } } } //сортировка таблиц в SaveTabGroups for (int i = 1; i < SaveTabGroups.Count - 1; i++) { int count = SaveTabGroups[i].TabGroupNumerations.Count; int[] array = new int[count]; for (int j = 0; j < count; j++) //для одной группы записываем нумерации строкой цифр { string st = ""; for (int h = 0; h < number; h++) { st += SaveTabGroups[i].TabGroupNumerations[j][h]; } array[j] = int.Parse(st); } Common.RadixSorting(array, 10, number); for (int j = 0; j < count; j++) { SaveTabGroups[i].TabGroupNumerations.RemoveAt(j); string st = (array[j]).ToString(); Permutation arrForPerm = new Permutation(); for (int p = 0; p < this.number; p++) { arrForPerm.Add(int.Parse(st.Substring(p, 1))); } SaveTabGroups[i].TabGroupNumerations.Insert(j, arrForPerm); } } }