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; }
public void Add(Permutation p) { _perms.Add(p); p.Index = _perms.IndexOf(p); p.PropertyChanged += p_PropertyChanged; }
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; }