Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 636 Bytes

File metadata and controls

28 lines (19 loc) · 636 Bytes

parmigiano

This library does finite permutations in Java.

Cycle based

Permutation.cycle(0, 1).apply(List.of("a", "b", "c"));
// => ["b", "a", "c"]

Composition

Permutation.cycle(0, 1).compose(2, 3);
// => (0 1) (2 3)

Getting all permutations of 5 Elements

Permutation.symmetricGroup(5).count();
// => 120

Permutation group: