p=randomAddition(n,m,P)
p=randomAddition(R,m,P)
This function randomly chooses a facet of size m+1 and checks whether the facet can be shellably added to the shelling. If it can be shellably added to the shelling, it is added to the shelling and the new shelling is returned. Otherwise, the process repeats up to 20 times.
This function can be used to randomly construct nonpure shellable complexes. A new msimplex can only be glued to previous simplices of dimension at least m. If all previous simplices are smaller, then the addition will fail.



If the input is not a shellable simplicial complex, the new complex will not be shellable. The function does not check whether the input is shellable.
The object randomAddition is a method function.