HyperGraph

Details

diff --git a/WPF/Model/Calculate.cs b/WPF/Model/Calculate.cs
index d1bd857..11f7c94 100644
--- a/WPF/Model/Calculate.cs
+++ b/WPF/Model/Calculate.cs
@@ -565,19 +565,35 @@ namespace WPF.Model
                 for (int i = 0; i < _default.Count; i++)
                 {
                     var edge = new List<string>(result.GraphWithoutAutoEdges.HyperEdge[i]);
+
                     var sameFirst = edge.Take(sameVertCount).ToList();
+                    var firstTranspose = Combinatorics<string>.Transposition(sameFirst);
+                    firstTranspose.Insert(0, sameFirst);
+
                     var sameLast = edge.Skip(edge.Count - sameVertCount).ToList();
+                    var lastTranspose = Combinatorics<string>.Transposition(sameLast);
+                    lastTranspose.Insert(0, sameLast);
+
                     edge = edge.Except(sameFirst).Except(sameLast).ToList();
-                    List<List<string>> transpos = Combinatorics<string>.Transposition(edge);
-                    transpos.Insert(0, edge);
-                    for (int j = 0; j < transpos.Count; j++)
+                    List<List<string>> transposIndividual = Combinatorics<string>.Transposition(edge);
+                    transposIndividual.Insert(0, edge);
+
+                    List<List<string>> transpose = new List<List<string>>();
+
+                    List<List<int>> transposSame = Combinatorics<int>.CombinationWithReplays(sameVertCount, 2);
+                    for (int j = 0; j < transposSame.Count; j++)
                     {
-                        transpos[j].InsertRange(0, sameFirst);
-                        transpos[j].AddRange(sameLast);
+                        for (int k = 0; k < transposIndividual.Count; k++)
+                        {
+                            
+                            transpose.Add(new List<string>(firstTranspose[transposSame[j][0]]));
+                            transpose.Last().AddRange(new List<string>(transposIndividual[k]));
+                            transpose.Last().AddRange(new List<string>(lastTranspose[transposSame[j][1]]));
+                        }
                     }
 
-                    comboVerticies.Add(_default[i], transpos);
-                    size = transpos.Count;
+                    comboVerticies.Add(_default[i], transpose);
+                    size = transpose.Count;
                 }
 
                 var combination = Combinatorics<int>.CombinationWithReplays(size, length);
@@ -598,6 +614,21 @@ namespace WPF.Model
                             foreach (var t in splitEdges)
                                 t.Reverse();
                         }
+
+                        var _length = splitEdges.Count;
+                        var _len = splitEdges.First().Count;
+                        bool res = true;
+                        for (int j = 0; res && j < _length; j++)
+                        {
+                            for (int l = 0; res && l < sameVertCount; l++)
+                            {
+                                res = splitEdges[j % _length][_len - sameVertCount + l].Equals(
+                                    splitEdges[(j + 1) % _length][sameVertCount - 1 - l]);
+                            }
+                        }
+                        if (!res)
+                            continue;
+
                         var fullString = "(" + string.Join(") (", splitEdges.Select(lst => string.Join("-", lst))) + ")";
 
                         //  Записываем строковый вид автоморфизма в общий список
diff --git a/WPF/ViewModel/MainViewModel.cs b/WPF/ViewModel/MainViewModel.cs
index 9c673a3..3f559b1 100644
--- a/WPF/ViewModel/MainViewModel.cs
+++ b/WPF/ViewModel/MainViewModel.cs
@@ -57,11 +57,11 @@ namespace WPF.ViewModel
             //Verticies[3].Value = 8;
             //SelectedTheorem = EnumTheorem.Forth;
             EdgesNum = 4;
-            SameVertNum = 1;
-            Verticies[0].Value = 4;
-            Verticies[1].Value = 4;
-            Verticies[2].Value = 4;
-            Verticies[3].Value = 4;
+            SameVertNum = 2;
+            Verticies[0].Value = 6;
+            Verticies[1].Value = 6;
+            Verticies[2].Value = 6;
+            Verticies[3].Value = 6;
             SelectedTheorem = EnumTheorem.Fifth;
 #endif