-
-
Notifications
You must be signed in to change notification settings - Fork 652
Lazy species #38544
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
Lazy species #38544
Conversation
Documentation preview for this PR (built with commit ebddbd4; changes) is ready! 🎉 |
Ping? |
Ah, right, it would pass the class rather than the instance. I think I messed up my initial experiment. However, this does work: sage: class Foo():
....: def __init__(self, B):
....: print(B)
sage: class Bar():
....: def __init__(self, v):
....: self.v = v
....: from types import MethodType
....: self.F = MethodType(Foo, self)
....: def __repr__(self):
....: return "Bar: %s" % self.v
sage: B = Bar(5)
sage: B.F()
Bar: 5
<__main__.Foo object at 0x723f4645e660>
Yes, that is the downside with my |
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.
One doc thing and one general question (that I probably should have asked much earlier, sorry).
Should we call these Lazy(Combinatorial)Species
and not just (Combinatorial)Species
? Having Lazy
in front suggests there is or will be a finite precision/non-lazy version, but I don't think this will happen.
Once addressed, it will be a positive review.
@@ -407,3 +407,4 @@ Comprehensive Module List | |||
sage/combinat/words/words | |||
sage/combinat/yang_baxter_graph | |||
sage/rings/cfinite_sequence | |||
sage/rings/lazy_species |
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.
We probably should put this with the L's rather than at the bottom. Also, would there be some other natural place to link this doc? It's hard to find just being in the big combinat module list.
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.
you mean, move it between k_tableau
and lr_tableau
?
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.
Yes, that’s correct.
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.
Should I move cfinite_sequence
, too, or in a different PR?
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.
While I would normally say it’s better to move it in a different PR, we can just get it done here
No problem! I'm amazed and it really makes me happy that you do thorough reviews!
I put the I agree that a finite precision version won't happen. We could have The reason for not advocating: |
Co-authored-by: Travis Scrimshaw <clfrngrown@aol.com>
I don’t think the lazy in from makes it very discoverable compared to the API we have for similar such objects (mainly |
Just a brief update: I am not sure. Essentially, that does mean that we should make Another thing I just noticed is that I guess we could first leave things as they are (perhaps rename |
In the sense of a common abstract class and creation (with the default precision being passed as
Hmm….that’s really annoying. We can’t really just do a drop-in replacement as it has different API, right? We could do a 2 step deprecation: the |
I would like to move on here. Meanwhile, I have also implemented the arithmetic product. I agreed to give an online course on enumeration with sagemath at 128.5, but I guess it is too late to have this even in develop. |
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.
Okay, we can merge this now. I would like to deprecate LazyCombinatorialSpecies
once we have the full replacement for the old version ready, but we can address that at that time.
Thank you! |
sagemathgh-38544: Lazy species We provide an implementation of combinatorial species based on the lazy series framework and sagemath#38446. dependencies: sagemath#38974 URL: sagemath#38544 Reported by: Martin Rubey Reviewer(s): Martin Rubey, Travis Scrimshaw
sagemathgh-38544: Lazy species We provide an implementation of combinatorial species based on the lazy series framework and sagemath#38446. dependencies: sagemath#38974 URL: sagemath#38544 Reported by: Martin Rubey Reviewer(s): Martin Rubey, Travis Scrimshaw
This is causing one test failure here (Arch, all dependencies up to date)
|
Thank you for reporting! The problem is that there is no good ordering on the terms. Shall I mark it as random? |
I'd say mark that one as random, and then test equality against the expected output |
see #40304 |
sagemathgh-40129: combinatorial log Implement the combinatorial logarithm as proposed by Labelle 2013. fixes sagemath#40112, fixes sagemath#40131 dependencies: sagemath#38544 URL: sagemath#40129 Reported by: Martin Rubey Reviewer(s): Travis Scrimshaw
sagemathgh-40129: combinatorial log Implement the combinatorial logarithm as proposed by Labelle 2013. fixes sagemath#40112, fixes sagemath#40131 dependencies: sagemath#38544 URL: sagemath#40129 Reported by: Martin Rubey Reviewer(s): Travis Scrimshaw
We provide an implementation of combinatorial species based on the lazy series framework and #38446.
dependencies: #38974