PermutationGroup { public void enter(Permutation g) { int deg = size; int i = test(g); if (i == deg) { return; } else { permutations[i][g.get(base.get(i))] = new Permutation(g); } for (int j = 0; j <= i; j++) { for (int a = 0; a < deg; a++) { Permutation h = permutations[j][a]; if (h != null) { Permutation f = g.multiply(h); enter(f); } } } } PermutationGroup(int size);  PermutationGroup(Permutation base);  PermutationGroup(int size, List<Permutation> generators); static PermutationGroup makeSymN(int size); int getSize(); long order(); Permutation get(int uIndex, int uSubIndex); List<Permutation> getLeftTransversal(int index); List<Permutation> transversal(final PermutationGroup subgroup); void apply(Backtracker backtracker); List<Permutation> all(); void changeBase(Permutation newBase); void enter(Permutation g); int test(Permutation permutation); @Override String toString();  }
@Test public void enterTest() { int size = 4; PermutationGroup group = new PermutationGroup(size); group.enter(new Permutation(1, 0, 3, 2)); Assert.assertEquals(2, group.order()); }