The poset $P$ is ranked if there exists an integer function $r$ on the vertex set of $P$ such that for each $a$ and $b$ in the poset if $b$ covers $a$ then $r(b) - r(a) = 1$.
This method returns the list of vertices in each rank.
i1 : rankPoset chain 5 o1 = {{1}, {2}, {3}, {4}, {5}} o1 : List |
i2 : rankPoset booleanLattice 3 o2 = {{000}, {001, 010, 100}, {011, 101, 110}, {111}} o2 : List |
This method uses the method rankFunction, which was ported from John Stembridge's Maple package available at http://www.math.lsa.umich.edu/~jrs/maple.html#posets.
The object rankPoset is a method function.