-
-
Notifications
You must be signed in to change notification settings - Fork 452
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
Make base ring appear in self representation of PointConfiguration #22132
Comments
comment:1
I think there are some issues with that class. First of all, the fact that it's "UniqueRepresentation" is quite awful: it means that the construction parameters are cached globally, and hence pinned in memory until the structure disappears. Furthermore, is this actually a parent?
and the derivation of the base ring seems fishy too:
That seems wrong. For the string representation, I'd go for
The reality is, |
Branch: u/moritz/22132 |
Commit: |
comment:3
I agree that some other behavior is problematic in this class. I like your proposal for the string representation and prepared a branch with the necessary changes. New commits:
|
comment:4
This is actually a parent; the problem is that the
Although I don't see the problem with this being a |
comment:5
Replying to @tscrim:
OK, I see. The documentation indeed says that elements of a pointconfiguration are triangulations (not points as the name suggests).
That can be a lot of points! And as you can see (because the parent needs to be normalized), the original input points would be a rather bad key to base the construction on. Also, because the input is so extensive, I would expect it to be very rare that someone would be trying to construct the same configuration twice without having access to exactly the same list of points. So I think there is no benefit that is derived from caching the parent. There are definitely drawbacks in that by having a weak reference from a global dictionary pointing at an object, you can get obscure memory leaks quite easily. So the problem I see with
Yes, the caching is fine, but I don't think we'd get much benefit from additionally keying that cache globally under the construction parameters rather than simply on the object itself and requiring that the user will keep a reference to the object for as long as he/she wants access to that cache. |
comment:6
Thank you guys for replying to the ticket! Ok, should the issue with In this ticket simply wanted to make sure that is doesn't say "points in |
comment:7
One detail: - A point configuration in QQ^0 consisting of 0 points. The
+ A point configuration in affine 0-space over None Is this output really better? |
comment:8
Sorry for the delayed response, I've been traveling and on holidays. I think you're right Nils, we probably should do away with the |
comment:10
thanks Matthias Köppe; the new representation was indeed not an improvement for the empty configuration. I added a special case to the routine. |
comment:11
Looking good. |
Reviewer: Matthias Koeppe |
Author: Moritz Firsching |
Changed branch from u/moritz/22132 to |
When defining point configurations with other base ring than QQ, the self reprensentation of the instance of the class PointConfiguration still returns QQ.
The hardcoded "QQ" should be changed to be more flexible and actually return the type of base ring; e.g. AA, RDF, RLF or whatever.
The code that needs to be changed reads:
Component: geometry
Keywords: base_ring
Author: Moritz Firsching
Branch/Commit:
a11676b
Reviewer: Matthias Koeppe
Issue created by migration from https://trac.sagemath.org/ticket/22132
The text was updated successfully, but these errors were encountered: