Skip to content
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

Enabled poly ring caching in charpoly/minpoly (when no poly ring passed in) #1976

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JohnAAbbott
Copy link
Collaborator

After discussion in triage meeting today: now characteristic_polynomial(M) == characteristic_polynomial(M) works, and similarly for minpoly(M). The automatically created polynomial ring is cached. I also commented why caching is enabled.

Copy link

codecov bot commented Jan 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.34%. Comparing base (956a964) to head (ef1c947).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1976   +/-   ##
=======================================
  Coverage   88.34%   88.34%           
=======================================
  Files         124      124           
  Lines       31404    31404           
=======================================
  Hits        27743    27743           
  Misses       3661     3661           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@thofma
Copy link
Member

thofma commented Jan 29, 2025

I am sympathetic to this change, but it would mean fixing all charpoly/characteristic_polynomial calls with a single argument in Nemo/Hecke/Oscar (functions are not allowed to create cached objects).

It becomes also be a bit unergonomic to create characteristic polynomials without caching the parent of the polynomial. I wonder whether something like charpoly(M; cached::Bool = true) would make sense. It sounds a bit ambiguous though (is it caching the characteristic polynomial?!).

Happy to hear what others think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants