-
-
Notifications
You must be signed in to change notification settings - Fork 654
Commit 5d0093c

Release Manager
gh-36814: Fast cardinality method for IntegerVectorsModPermutationGroup
# Fast cardinality method for IntegerVectorsModPermutationGroup
This patch fixes #36787 by implementing a `cardinality` method for
`IntegerVectorsModPermutationGroup_with_constraints`. The method
calculates the cardinality using the the [Polya enumeration
theorem](https://en.wikipedia.org/wiki/P%C3%B3lya_enumeration_theorem)
(also known as the cycle index theorem).
It is faster than the the default implementation, which iterates through
the full set to
find the cardinality.
Incidentally this PR fixes also #36681 so that cardinality and iter no
longer crash in empty-domain situations.
### 📝 Checklist
<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->
- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [x] I have created tests covering the changes.
- [x] I have updated the documentation accordingly.
### ⌛ Dependencies
- #36873: we can use `is_trivial` from that PR
<!-- List all open PRs that this PR logically depends on
- #12345: short description why this is a dependency
- #34567: ...
-->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
URL: #36814
Reported by: Jukka Kohonen
Reviewer(s): Dima Pasechnik, Jukka Kohonen, Martin Rubey, Travis Scrimshaw
File tree
Expand file treeCollapse file tree
4 files changed
+369
-39
lines changedFilter options
- src/sage
- combinat
- groups
- matrix_gps
- perm_gps
Expand file treeCollapse file tree
4 files changed
+369
-39
lines changed
0 commit comments