Exemple #1
0
 public static Permutation CreateID(int nstrands)
 {
     Permutation p = new Permutation(nstrands);
     for (int i = 0; i < nstrands; i++)
     {
         p.Mappings.Add(new Map(i));
     }
     return p;
 }
Exemple #2
0
 public void Add(Permutation p)
 {
     _perms.Add(p);
     p.Index = _perms.IndexOf(p);
     p.PropertyChanged += p_PropertyChanged;
 }
Exemple #3
0
 private void CreateBraidData()
 {
     BraidData b = new BraidData();
     b.Repeats = 4;
     Permutation p = new Permutation();
     p.SetPermOf(0, 1);
     p.SetPermOf(1, 0);
     b.Add(p);
     p = new Permutation();
     b.Add(p);
     p = new Permutation();
     p.SetPermOf(0, 1);
     p.SetPermOf(1, 0);
     b.Add(p);
     BraidPatterns.Add(b);
     b.PropertyChanged += b_PropertyChanged;
 }