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.
i1 : rankFunction chain 5 o1 = {0, 1, 2, 3, 4} o1 : List |
i2 : rankFunction booleanLattice 3 o2 = {0, 1, 1, 2, 1, 2, 2, 3} o2 : List |