New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generalize face iterator of combinatorial polyhedron to locally branched lattices #31226
Comments
Reviewer: Travis Scrimshaw |
comment:2
I guess it would be too complicated to try and have both algorithms with a heuristic cutoff for determining which to use? At least the slowdown does not seem to be so bad overall except for what I might call the "intermediate" case. So I think this will be good to include. If the patchbot comes back green, then positive review. |
comment:3
The slowness is due to the fact that checking a value in I guess one could check, if the sets are really small, but that would be annoying, because there would be another switch just for this tiny case. The main point is to expose this algorithm with both flavors (locally branched and simple lattice) and use it (for now at least for simplicial complexes and flats of a matroid). Currently, this basically works and all that is missing is creating some wrapper classes. Creating more switches, might make this harder (because this switch only works for the diamond property). |
comment:4
I see. Thank you for the analysis. Positive review. |
comment:5
Thank you. Depending on whether a use case, I might add a variant yet, that only requires atomic and coatomic, but I don't know yet (coatomic is needed so that elements can be computed by coatoms, atomic is needed so that the representation by atoms somewhat makes sense and inclusion checks can be performed). |
Changed branch from u/gh-kliem/generalize_algorithm_to_locally_branched to |
Currently, the face iterator requires either the lattice to be simple (all intervals not containing zero are boolean) or that it satisfies the diamond property.
With little effort, the algorithm can be exploited for intersection lattices of Coxeter arrangements.
Those lattice do no longer satisfy the diamond property, but intervals of length 2 contain at least 4 elements (locally branched).
What can happen then, is that there are multiple ways to obtain codim 2 faces from the codim 1 faces.Thus when obtaining the inclusion maximal, one needs to be careful about duplicates.
We change the algorithm to account for this. To check whether a face is inclusion maximal, we basically use strict containment check to the left and non-strict containment test to the right. Thus, not deleting the last instance of a maximal element.
Performancewise this is a mix. For small instances with few atoms in the iterator (the maximum of vertices and facets), there is a slight slowdown.
With many atoms, there will usually be an improvement, as checking a boolean is much faster than subset check of a long set.
Before:
After:
Note that grading is somewhat not required for the algorithm, just an upper bound on the maximal chain length. The only thing that happens is that the codimension becomes meaningless in this case.
CC: @stumpc5 @tscrim
Component: geometry
Keywords: coxeter arrangement, combinatorial polyhedron
Author: Jonathan Kliem
Branch/Commit:
5c6ccee
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/31226
The text was updated successfully, but these errors were encountered: