PermutationGroup { public long order() { long total = 1; for (int i = 0; i < size; i++) { int sum = 0; for (int j = 0; j < size; j++) { if (this.permutations[i][j] != null) { sum++; } } total *= sum; } return total; } 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 orderTest() { int size = 5; PermutationGroup sym = PermutationGroup.makeSymN(size); Assert.assertEquals(factorial(size), sym.order()); }