L = shellingOrder S
If $S$ is pure, then definition III.2.1 in [St] is used. That is, $S$ is shellable if its facets can be ordered $F_1, .., F_n$ so that the difference in the $j$-th and $j-1$-th subcomplex has a unique minimal face, for $2 \leq j \leq n$.
If $S$ is non-pure, then definition 2.1 in [BW-1] is used. That is, a simplicial complex $S$ is shellable if the facets of $S$ can be ordered $F_1, .., F_n$ such that the intersection of the faces of the first $j-1$ with the faces of the $F_j$ is pure and $dim F_j - 1$-dimensional.
This function attempts to build up a shelling order of $S$ recursively. In particular, a depth-first search is used to attempt to build up a shelling order from the bottom, that is, from the first facet in the order.
In the case when $S$ is non-pure, then the search is restricted to the maximal dimension facets remaining to be added. This allows a shelling order in reverse dimension order to be returned whenever $S$ is indeed shellable.
|
|
|
|
|
|
The options Random and Permutation can be used to try to find alternate shelling orders. Random applies a random permutation to the facet list and Permutation applies a supplied permutation to the list. In the non-pure case, the facets are subsequently ordered in reverse dimension order but retaining the ordering within dimensions.
The options Random and Permutation are mutually exclusive.
|
|
|
|
The shelling order is cached if it exists, however, if either option is used, then the cache is ignored.
The object shellingOrder is a method function with options.