Open dkrenn opened 5 years ago
Branch: u/dkrenn/cache-groebner
New commits:
8acaaf1 | Trac #27328: use cache if possible and no algorithm given |
The proposed solution is now that if there is no algorithm given but something is cached, then this is taken.
The building of the cache is still reliant on cached_method
. For instance, that means that if I.groebner_basis()
is called and then I.groebner_basis(algorithm=<whatever the default is>)
, then the algorithm gets executed twice.
Replying to @nbruin:
The building of the cache is still reliant on
cached_method
. For instance, that means that ifI.groebner_basis()
is called and thenI.groebner_basis(algorithm=<whatever the default is>)
, then the algorithm gets executed twice.
Yes, this is indeed true. The problem is that I.groebner_basis()
does not simply translate to I.groebner_basis(algorithm=<somealgorithmname>)
at the beginning, but tries a couple of things which might lead to a result. Any ideas how this can be taken care of?
Replying to @dkrenn:
Replying to @nbruin:
The building of the cache is still reliant on
cached_method
. For instance, that means that ifI.groebner_basis()
is called and thenI.groebner_basis(algorithm=<whatever the default is>)
, then the algorithm gets executed twice.Yes, this is indeed true. The problem is that
I.groebner_basis()
does not simply translate toI.groebner_basis(algorithm=<somealgorithmname>)
at the beginning, but tries a couple of things which might lead to a result. Any ideas how this can be taken care of?
The generic way around that is to instead have the default call self.groebner_basis(algorithm=<algorithmname>)
with the chosen algorithm. The other thing you could do, and which might be better, is to explicitly set the cache in those cases.
Ticket retargeted after milestone closed (if you don't believe this ticket is appropriate for the Sage 8.8 release please retarget manually)
Replying to @tscrim:
[...] The problem is that
I.groebner_basis()
does not simply translate toI.groebner_basis(algorithm=<somealgorithmname>)
at the beginning, but tries a couple of things which might lead to a result. Any ideas how this can be taken care of?The generic way around that is to instead have the default call
self.groebner_basis(algorithm=<algorithmname>)
with the chosen algorithm.
This is not what we want: We do want that algorithm=''
tries a couple of things until it succeeds (or fails after all).
The other thing you could do, and which might be better, is to explicitly set the cache in those cases.
You mean setting the cache for algorithm=''
to be the same as for algorithm='chosen'
. This could work ;)
Branch pushed to git repo; I updated commit sha1. New commits:
9d4ffa6 | Trac #27445: groebner basis for multi-variate polynomial ring with no variables |
6afce66 | Trac #27445: polynomial rings over non-fields + major restructure of relevant code |
df26e69 | Merge tag '8.7' into t/27445/gb-no-var |
eaaa150 | Merge branch 't/27445/gb-no-var' into t/27328/cache-groebner |
3234c66 | Trac #27328: remove ignored/incompatibel/ununsed *args in groebner basis computations |
c0b2168 | Trac #27328: simplify parameter processing in groebner_basis |
de2dc6c | Trac #27328: fixup prot parameter in submethod |
35f231f | Trac #27328: enable "not tested" doctests as they work now |
36ba0ee | Trac #27328: do proper caching of groebner_basis |
Replying to @dkrenn:
You mean setting the cache for
algorithm=''
to be the same as foralgorithm='chosen'
. This could work ;)
Works indeed; see current implementation.
Replying to @nbruin:
The building of the cache is still reliant on
cached_method
. For instance, that means that ifI.groebner_basis()
is called and thenI.groebner_basis(algorithm=<whatever the default is>)
, then the algorithm gets executed twice.
This is now fixed as well.
I've changed the code so that all issues are solved.
Moreover, I've simplifed the way arguments are processed and handled, and cleaned up of what seems to be historically grown (and sometimes not even used or incompatible or even ignored).
Please review :)
Forgot push; now updated :)
Moving tickets from the Sage 8.8 milestone that have been actively worked on in the last six months to the next release milestone (optimistically).
Ticket retargeted after milestone closed
Batch modifying tickets that will likely not be ready for 9.1, based on a review of the ticket title, branch/review status, and last modification date.
It's been long enough that I'm getting a merge failure. Rebase?
Setting new milestone based on a cursory review of ticket status, priority, and last modification date.
returns
False
, the Gröbner basis is recomputed. This is problematic, as a lot of methods (e.g..variety
) simply call.groebner_basis()
and a precomputed Gröbner basis (maybe with a different algorithm than the default) is not used.Component: algebra
Author: Daniel Krenn
Branch/Commit: u/dkrenn/cache-groebner @
82d81c8
Issue created by migration from https://trac.sagemath.org/ticket/27328