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
List Sidon g-sets #11624
Comments
comment:1
Attachment: trac-11624-sidon_sets.patch.gz Hello, I downloaded the patch, it applied and worked well. I never played with Sidon sets before and know relatively nothing about them. I did that as first computation :
And asked the Sloane for what does it look like : Number of binary partitions: number of partitions of 2n into powers of 2. So, is there a bug in the algorithm or I am perhaps missing something... It seems to me that the algorithm miss some Sidon sets. I don't really know... For example, Sloane tell that [1,2,4,8,13] is a Sidon set but currently the algorithm returns:
On the technical point of view, the sage code convention is to indent by block of 4 spaces. don't use tabulation... It should look like that:
There is a micro typo line 44 of the patch -> Valuerror Sorry for my poor English... Put the status "needs review" when you will feel the job is finish from your side. This will be a nice add. Cheers, |
comment:2
Attachment: trac-11624-sidon_sets-v2.patch.gz Sorry for this. That were two stupid mistakes, that could have been easily caught by better testing. I added the tests for the exceptions and I checked that the Sidon set that was missing before is found now. Apply: trac-11624-sidon_sets-v2.patch |
This comment has been minimized.
This comment has been minimized.
Attachment: trac-11624-sidon_sets-review.patch.gz |
This comment has been minimized.
This comment has been minimized.
comment:3
Thanks for being so quick... I propose you a reviewer patch in which I had some tests and some documentations, I link the file to the rst combinat tree for the built doc, I categorifyed from the python frozenset feature to sage categories. I also put the clever code in a slave cached function because sphinx didn't want to build documentation of any cached function. I checked that sage -docbuild reference html give an acceptable printout. Tell me if you're agree with such change, feel free to improve my words in English (and correct mistakes if you find some...). Categories are a little bit technical but it really make us win a lot. They gives some coherence, factorize the code and allow us to use functorial construction, see for example :
To state if this feature is correct with what you want, just read 'Set??', all the magic is inside that. Apply:
|
comment:4
Attachment: trac-11624-sidon_sets-review2.patch.gz Perfect! I only updated the spelling of few words and left all other changes untouched. I think it is indeed a good idea to categorify this, even though, initially, I didn't for fear of performance loss. Thanks for that awesomely quick review! |
This comment has been minimized.
This comment has been minimized.
Reviewer: Nicolas Borie |
This comment has been minimized.
This comment has been minimized.
Merged: sage-4.7.2.alpha2 |
The attached patch provides a recursive algorithm that lists Sidon g-sets with elements of to a natural number N.
Apply:
Component: combinatorics
Author: Martin Raum
Reviewer: Nicolas Borie
Merged: sage-4.7.2.alpha2
Issue created by migration from https://trac.sagemath.org/ticket/11624
The text was updated successfully, but these errors were encountered: