Skip to content

add parameter immutable to cosetGraph#41466

Merged
vbraun merged 5 commits intosagemath:developfrom
dcoudert:graphs/add_immutable_to_cosetGraph
Jan 25, 2026
Merged

add parameter immutable to cosetGraph#41466
vbraun merged 5 commits intosagemath:developfrom
dcoudert:graphs/add_immutable_to_cosetGraph

Conversation

@dcoudert
Copy link
Copy Markdown
Collaborator

Following discussions in #39177, we add the option to return immutable graphs to method cosetGraph of class AbstractLinearCode.
On the way, we add parameter immutable to method sage.graphs.generators.families.HammingGraph and to some methods using cosetGraph in src/sage/graphs/generators/distance_regular.pyx.

📝 Checklist

  • The title is concise and informative.
  • 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 and checked the documentation preview.

⌛ Dependencies

@dcoudert dcoudert changed the title Graphs/add immutable to coset graph add parameter immutable to cosetGraph Jan 17, 2026
@dcoudert dcoudert self-assigned this Jan 17, 2026
@dcoudert
Copy link
Copy Markdown
Collaborator Author

dcoudert commented Jan 17, 2026

We also observe a speed up in distance_3_doubly_truncated_Golay_code_graph

Before:

sage: %time G = graphs.distance_3_doubly_truncated_Golay_code_graph()
CPU times: user 1.54 s, sys: 5.65 ms, total: 1.55 s
Wall time: 1.55 s

After

sage: %time graphs.distance_3_doubly_truncated_Golay_code_graph(immutable=True).is_immutable()
CPU times: user 1.04 s, sys: 3.84 ms, total: 1.04 s
Wall time: 1.04 s
True
sage: %time graphs.distance_3_doubly_truncated_Golay_code_graph(immutable=False).is_immutable()
CPU times: user 1.01 s, sys: 4.11 ms, total: 1.02 s
Wall time: 1.02 s
False

@github-actions
Copy link
Copy Markdown

Documentation preview for this PR (built with commit 88eee87; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

Copy link
Copy Markdown
Contributor

@fchapoton fchapoton left a comment

Choose a reason for hiding this comment

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

ok, good.

@vbraun vbraun merged commit 9be6090 into sagemath:develop Jan 25, 2026
22 of 25 checks passed
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