#16662: OA for n=1046,1059,2164,3992,3994
-------------------------------------+-------------------------------------
Reporter: ncohen | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.4
Component: combinatorial | Resolution:
designs | Merged in:
Keywords: | Reviewers:
Authors: Nathann Cohen | Work issues:
Report Upstream: N/A | Commit:
Branch: u/ncohen/16662 | 8fcaed066b7f110af10c6a471cbebcad370bd312
Dependencies: #16604 | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by ncohen):
Yo !
> It is not only caching. With a more naive approach you would have
What you do there is the work of the "all_n" function I wound like to
write. I would like to replace the
{{{
for n in range(N-2):
if is_prime(n)
}}}
with
{{{
for n in prime_powers(N-2):
...
}}}
But it is not possible because you use n to build the cache.
> About your caching system, what would be the difference between
`is_available` and `exists`? And instead of `all_n` I would prefer
`nrange` or something more pythonic.
`is_available` would not trigger non-existence tests. But perhaps that is
less useful since your rewrote the `is_sum_of_squares` thing.
Nathann
--
Ticket URL: <http://trac.sagemath.org/ticket/16662#comment:24>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.