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 one such ranking function.
|
|
|
|
This method was ported from John Stembridge's Maple package available at http://www.math.lsa.umich.edu/~jrs/maple.html#posets.
The object rankFunction is a method function.