Closed kliem closed 3 years ago
New commits:
0c44221 | important attributes of iterator in structure |
efb0bd3 | src/simplification of doctests |
53fd2a2 | fixed failing doctest |
142d3a8 | bad alignment causing bug noticed in #28982 |
2b07f03 | Merge branch 'public/28894-reb5' of git://trac.sagemath.org/sage into develop |
33804bd | prepare slightly modified algorithm for simple/simplicial polytopes |
99579b3 | faster algorithm for simple/simplicial polytopes |
46d1eb6 | small fixes |
ceab503 | improvements in documentation |
Branch: public/30040
Needs rebase.
Description changed:
---
+++
@@ -7,7 +7,7 @@
- To intersect we now additionally unite the coatom representation. This gives the correct representation of the new face unless the intersection is zero.
-- To see whether a new face is of codimension one, we check whether the difference of the length of coatom representations is one.
+- An intersection of two facets has always codimension, if not empty (they contain a common atom and are thus contained in a common boolean sublattice).
- To mark a face as visited, we save its coatom representation in `visited_all_coatom_rep`.
Description changed:
---
+++
@@ -7,7 +7,7 @@
- To intersect we now additionally unite the coatom representation. This gives the correct representation of the new face unless the intersection is zero.
-- An intersection of two facets has always codimension, if not empty (they contain a common atom and are thus contained in a common boolean sublattice).
+- An intersection of two facets has always codimension 1, if not empty (they contain a common atom and are thus contained in a common boolean sublattice).
- To mark a face as visited, we save its coatom representation in `visited_all_coatom_rep`.
Changed dependencies from #28894 to #30428
Changed dependencies from #30428 to #30428, #30429
Changed work issues from There is a merge conflict with #29676. Whichever takes longer needs to be rebased. to There are merge conflicts with #29676, #29681. Whichever takes longer needs to be rebased.
Changed branch from public/30040 to public/30040-reb
New commits:
39f3a38 | directly check is_simple/is_simplicial |
fe880a4 | input of `intersection` in standard order |
bc27cd1 | Merge branch 'public/30429' of git://trac.sagemath.org/sage into public/30040 |
4478f3c | unite and is_zero for bit_vectors |
131c065 | add a specialized `get_next_level_simple` |
bc00d42 | prepare slightly modified algorithm for simple/simplicial polytopes |
4fdc787 | faster algorithm for simple/simplicial polytopes |
4724d3c | small fixes |
0297853 | improvements in documentation |
7ffac00 | changes in 30429 |
Typo: intervalls
-> intervals
Bikeshedding: Personally, I find sizeof(uint64_t **)
confusing compared to sizeof(uint64_t**)
, where IMO is more indicative that it is a pointer. Feel free to ignore this comment.
I feel like #29676 and #29681 are more natural as dependencies of this ticket given their changes, but that is not a strong opinion. I am happy to do the review of those tickets as well. Also, beyond these to things above, this ticket LGTM.
Branch pushed to git repo; I updated commit sha1. New commits:
01b4154 | typo |
At some point I started doing it like cdef uint64_t *foo
, hence the sizeof(uint64_t *)
.
This works well, because you can legally do cdef uint64_t *foo, *foo2
, however I quickly stopped that because I got warnings that I'm not supposed to do this.
Once you start declaring each pointer in its own line, you can go to cdef uint64_t* foo
, which is more natural, I agree. I just didn't yet. I think I should have a seperate ticket that gets this stuff in order in the entire folder. At the moment everything is one style, which is also desirable, I think.
In principal #29676 and #29681 are more natural as dependencies of this ticket than vice versa (both are somewhat nice to review at the moment). I agree. But I don't want them to be in the way (in case they are sitting there without review). I'm happy to rebase whatever makes sense
Actually, there is a mistake.
To use the coatom representation to a mark a face as visited will work for polyhedra, but does require the uniqueness of the coatom representation. So this will not work for simplicial complexes.
Never mind. I should have read closely and rethought. The atom-representation is not unique. This is the entire point of worrying about the coatom representation. It's not because it is shorter, but because this is the only thing that will work for simplicial complexes.
Changed dependencies from #30428, #30429 to #30428, #30429, #30458
Reviewer: Travis Scrimshaw
I just did the review of #29676 and #29681. So if you could rebase this based on those and just let me know if there are any non-trivial changes, then I should be able to finish the review of this ticket quickly.
Changed work issues from There are merge conflicts with #29676, #29681. Whichever takes longer needs to be rebased. to none
Changed dependencies from #30428, #30429, #30458 to #29676, #29681, #30428, #30429, #30458
Last 10 new commits:
5cf6261 | Merge branch 'u/gh-kliem/outsource_inclusion_maximal' of git://trac.sagemath.org/sage into public/30040-reb2 |
7f5b19f | unite and is_zero for bit_vectors |
1496bfd | add a specialized `get_next_level_simple` |
fc4784a | changes in 30429 |
81ba2e0 | simplify `get_next_level_simple by 30458 |
9cece74 | prepare slightly modified algorithm for simple/simplicial polytopes |
fe5852a | typo |
1510386 | faster algorithm for simple/simplicial polytopes |
86c564a | small fixes |
ed6e966 | improvements in documentation |
Changed branch from public/30040-reb to public/30040-reb2
Putting all five dependencies together works cleanly.
Putting in the commits of this ticket was annoying but pretty much trivial.
It's all about figuring out, where those things have moved (and that self.structure
is now structptr[0]
in the nogil
functions).
If the patchbot comes back green, you can set a positive review on my behalf.
Thank you.
Replying to @tscrim:
If the patchbot comes back green, you can set a positive review on my behalf.
Startup time warning, but I'm not dealing with any startup object, so I think it's not my fault.
merge conflict
Branch pushed to git repo; I updated commit sha1. New commits:
40e6667 | Merge branch 'u/gh-kliem/improved_count_atoms' of git://trac.sagemath.org/sage into public/30040-reb2 |
Branch pushed to git repo; I updated commit sha1. New commits:
242cba7 | Merge branch 'develop' of git://trac.sagemath.org/sage into public/30040-reb2 |
Tests still pass. It really appears to be a question in what order you merge.
Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. This was a forced push. Last 10 new commits:
5311cdf | grammar |
eef6cf5 | unite and is_zero for bit_vectors |
a4fa8cf | add a specialized `get_next_level_simple` |
07b9746 | changes in 30429 |
c51fe62 | simplify `get_next_level_simple by 30458 |
f3e2ddc | prepare slightly modified algorithm for simple/simplicial polytopes |
edad681 | typo |
5939b5d | faster algorithm for simple/simplicial polytopes |
f997cec | small fixes |
63b7bd6 | improvements in documentation |
Rebased.
Changed branch from public/30040-reb2 to 63b7bd6
So far the face iterator for polyhedra assumes the diamond property of the lattice only. The special case of simple/simplicial polytopes is not exploited. In this case all intervals not containing zero of the lattice are boolean (for simplicial polytopes we use the dual algorithm).
We alter the algorithm to work for lattices where every interval not containing zero is a boolean sublattice. We may even drop any further conditions on the lattice. So we may apply the algorithm to lattices, where some "edges" have only one atom. Thus the algorithm can in principle be applied to simplicial complexes now in dual mode ("edges" with a single atom correspond to "ridges" only contained in one maximal face). The key observations are:
To check whether an intersection of faces is zero, we check whether the atom-representation is zero. Although not unique (in case the diamond property is relaxed), it works to distinguish from zero.
To intersect we now additionally unite the coatom representation. This gives the correct representation of the new face unless the intersection is zero.
An intersection of two facets has always codimension 1, if not empty (they contain a common atom and are thus contained in a common boolean sublattice).
To mark a face as visited, we save its coatom representation in
visited_all_coatom_rep
.To check whether we have seen a face already, we check containment of the coatom representation.
This algorithm performs much better and is also asymptotically better.
Before this ticket:
With this ticket:
Depends on #29676 Depends on #29681 Depends on #30428 Depends on #30429 Depends on #30458
CC: @jplab @LaisRast @tscrim
Component: geometry
Keywords: face iterator, simple, simplicial, polytopes
Author: Jonathan Kliem
Branch/Commit:
63b7bd6
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/30040