This package provides the core functionality for symmetria package.
Note: you should not use symmetria-core directly; instead use symmetria, which use symmetria-core as backend.
from symmetria_core import permutation
# a permutation is defined via its image
perm: tuple[int, ...] = (3, 4, 5, 2, 1, 6, 7)
ascents = permutation.ascents(image=perm)
assert ascents == [1, 2, 5, 6]
descents = permutation.descents(image=perm)
assert descents == [3, 4]
exceedances = permutation.exceedances(image=perm, weakly=True)
assert exceedances == [1, 2, 3, 6, 7]To contribute to this project you'll need: