Skip to content

jbock-java/parmigiano

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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: