-
-
Notifications
You must be signed in to change notification settings - Fork 614
Add skew Hadamard matrices up to order 1000 #35211
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
Add skew Hadamard matrices up to order 1000 #35211
Conversation
…m polynomial ring
can we get a test function, with And something similar for the skew case. |
I've added the function, but I didn't write the tests because they would take too long (around 10 min each). |
Documentation preview for this PR is ready! 🎉 |
It still needs a doctest that is run. I would extend the functionality slightly by adding an extra |
a function with prefixed by |
@dimpase That is completely wrong. That only applies to |
No, this is too restrictive. If true, this'd have effectively prevented Sage to have functions which are too long to run in doctests. And the function we are talking about is one of these. |
It is effectively a test itself, to be triggered by hand. There are other such functions, e.g. in graphs/ |
It is the rule, one I fully support. To me, this is suggesting that the function design is wrong. Again, see my suggestion about adding another parameter to set the upper bound. Or this should just become a doctest, with perhaps a smaller bound that is tested. Right now, this function is useless because it is not tested (so if something breaks, nobody will know) and not publicly shown (so nobody will even know to do this test). |
It is in the source, thus it is known. |
It is an important function, just too slow, for a good reason, to be tested in a doctest. That's all. |
Being in the source code (but not in the public documentation) does not make it discoverable. Who is going to even know about this, much less test it (which you are saying needs to be done by hand)? It is not even clear what that correct output should be. If it was just a doctest itself (marked with From another perspective, all of these constructions are actually tested at some place in the code. The point is to have a way for the user to iterate over the list of constructions to see which actually work in some range. Right now, it is basically just a doctest since the bounds are fixed, but it is put as a function. It seems like you want something more like In short, if it is important, then why isn't it public (and part of the standard doctests with some cutoff)? |
would it be OK to remove Also, make the name more descriptive, i.e. not |
Strictly speaking, that is not sufficient, but I can compromise on it. However, it still is speaking to me and saying that it should just be a doctest rather than a function. It feels like a magic number is being used. |
OK, @MatteoCati - how about indeed converting it into doctests, (tagged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. One last little thing (mostly formatting), but you are free to choose which option (some variation of it is also okay).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
sagemathgh-39262: Add script for checking for old deprecations <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> To find deprecations that can now safely removed. Example: ``` python tools/check_deprecations.py src/sage/combinat Found 9 deprecations. 100%| Deprecations over one year ago: File: src\sage\combinat\permutation.py, PR: sagemath#26810, Closed Date: 2019-01-23 File: src\sage\combinat\permutation.py, PR: sagemath#27467, Closed Date: 2019-06-12 File: src\sage\combinat\words\finite_word.py, PR: sagemath#30187, Closed Date: 2020-09-15 File: src\sage\combinat\designs\difference_family.py, PR: sagemath#35211, Closed Date: 2023-04-01 ``` ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [ ] 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 <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#39262 Reported by: Tobias Diez Reviewer(s): Frédéric Chapoton, Tobias Diez
📚 Description
This PR adds constructions for all known skew Hadamard matrices of order up to 1000. The following changes have been made:
difference_family.py
have been changed so that now they also return the group to which the sets belong. This makes the functions consistent with the others contained in this file, and makes them more efficient.Note that only commits from c0eb0c1 are new, the older ones where created in #35059.
📝 Checklist
⌛ Dependencies
#35059: this PR adds (non skew) Hadamard matrices of order <= 1000