Skip to content

sage.groups.perm_gps.partn_ref*: Modularization fixes - #35881

Merged
vbraun merged 5 commits into
sagemath:developfrom
mkoeppe:partn_ref_modularization
Jul 30, 2023
Merged

sage.groups.perm_gps.partn_ref*: Modularization fixes#35881
vbraun merged 5 commits into
sagemath:developfrom
mkoeppe:partn_ref_modularization

Conversation

@mkoeppe

@mkoeppe mkoeppe commented Jul 2, 2023

Copy link
Copy Markdown
Contributor

📚 Description

partn_ref2 depends on sage.libs.gap.

We restore the independence of partn_ref from sage.libs.gap by creating a separate function for the case of PS_first_smallest with non-None partn_ref_alg in partn_ref2.

We also remove the compile-time dependency on flint.

📝 Checklist

  • The title is concise, informative, and self-explanatory.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

⌛ Dependencies

Comment thread src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx Outdated
Comment thread src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx Outdated
"""
cdef int i = 0, j = 0, location = 0, n = PS.degree
bitset_zero(b)
while 1:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while True might be better.
Furthermore, this loop has no control on the max value of I . Isn't it safer to use a for loop combined with a else statement to raise an error in case break is never called ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've made these (and other) style fixes.

I also tested with an assert i < PS.degree at the end of the while loops and ran the tests for the faulty random seed reported in https://groups.google.com/g/sage-release/c/4mtUN8Rz92o/m/FLXKh321BgAJ; the assertion held, so at least this is not related.

I don't think I want to put the assertion there permanently though

Comment thread src/sage/groups/perm_gps/partn_ref/data_structures.pyx Outdated
@github-actions

Copy link
Copy Markdown

Documentation preview for this PR (built with commit 526efac; changes) is ready! 🎉

@dcoudert dcoudert left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@mkoeppe

mkoeppe commented Jul 28, 2023

Copy link
Copy Markdown
Contributor Author

Thank you!

@vbraun
vbraun merged commit 8b3883d into sagemath:develop Jul 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants