C = connectedComponents P
A connected component of $P$ is a set of vertices of $P$ such that every between every pair of vertices $u$ and $v$ in the set there exists a chain of vertices $(a_0=u,a_1,\ldots,a_n=v)$ such that $a_{i-1}$ and $a_i$ are comparable in $P$ for each $i$.
|
|
|
|
This method was ported from John Stembridge's Maple package available at http://www.math.lsa.umich.edu/~jrs/maple.html#posets.