Macaulay2 » Documentation
Packages » Permutations :: ascents
next | previous | forward | backward | up | index | toc

ascents -- computes the ascents of a permutation

Description

A permutation $p=(p_1 \, \dots \, p_n)$ has an ascent at $i$ (for $i < n$) if $p(i) < p(i+1)$.

i1 : p = permutation {3,1,2,5,4}

o1 = Permutation{3, 1, 2, 5, 4}

o1 : Permutation
i2 : ascents p

o2 = {2, 3}

o2 : List

See also

Ways to use ascents:

  • ascents(Permutation)

For the programmer

The object ascents is a method function.


The source of this document is in /build/reproducible-path/macaulay2-1.25.05+ds/M2/Macaulay2/packages/Permutations/Documentation/mainDocs.m2:78:0.