#15919: unrank via R[i] conflicts with notation for constructing polynomial
rings
in CartesianProduct
-------------------------------------+-------------------------------------
Reporter: darij | Owner:
Type: defect | Status: positive_review
Priority: major | Milestone: sage-6.2
Component: algebra | Resolution:
Keywords: notation, | Merged in:
algebra, polynomial | Reviewers: Travis Scrimshaw
Authors: Nicolas M. Thiéry | Work issues:
Report Upstream: N/A | Commit:
Branch: | 79d469861431ac8d6be5ad4edeace1c6ac8a62c8
u/tscrim/ticket/15919 | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by nthiery):
Replying to [comment:23 darij]:
> The only thing that somewhat worries me is the speed. Before:
> ...
> I don't know how often this unranking is used, though, and whether these
µs add up...
Ah good point; the `isinstance` and `in EnumeratedSets` checks cause a
little
overhead which is non negligible for inputs that have super fast
unranking (like lists).
My impression is that this unranking is not used much. If it really
became a bottleneck, a reasonable fix would be to have
CartesianProduct build unranking functions once for all upon the first
unrank (I started toying with this in
u/nthiery/15919-unrank-unrank-from), so that the above checks would be
done only once.
Besides, things should eventually resolve by themselves as
CartesianProduct gets
progressively replaced by cartesian_product (for which the inputs are
parents, or coerced into parents), and parents implement more
systematically the unrank protocol.
So altogether, in this balance between overhead and correctness, I
would lean here toward correctness. What do you think?
--
Ticket URL: <http://trac.sagemath.org/ticket/15919#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.