Library for generating and manipulating permutations of finitely many positive integers. Current version 0.5.0, updated occasionally.
pip install permutationNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Create and manipulate permutations using Perm class. Perm accepts values 1..n in order of images.
Use Perm(2,3,1) to get the permutation mapping 1→2, 2→3, 3→1. For cycles use Perm(1,3) to denote transposition (1 3).
Ensure all inputs are positive integers starting from 1.
Be consistent with notation. In many textbooks permutations are applied right-to-left; this library uses left-to-right.
For combinatorial algorithms with many permutations, consider specialized libraries.
No dependency data recorded yet.
No resource links recorded.