#15309: Symmetric group algebra creating algebra generators using
_element_constructor_
------------------------------------+-----------------------------
Reporter: tscrim | Owner: sage-combinat
Type: defect | Status: needs_review
Priority: major | Milestone: sage-5.13
Component: coercion | Resolution:
Keywords: | Merged in:
Authors: Travis Scrimshaw | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
------------------------------------+-----------------------------
Old description:
> When calling the `algebra_generators()`, `SymmetricGroupAlgebra` ends up
> setting the `_coercions_used` flag to `True`. This prevents us from
> creating coercions dynamically.
>
> For example:
> {{{#!python
> sage: S3 = SymmetricGroupAlgebra(QQ, 3)
> sage: S3._coercions_used
> False
> sage: S3.algebra_generators()
> [[2, 1, 3], [2, 3, 1]]
> sage: S3._coercions_used
> True
> }}}
New description:
When calling the `algebra_generators()`, `SymmetricGroupAlgebra` ends up
setting the `_coercions_used` flag to `True`. This prevents us from
creating coercions dynamically.
For example:
{{{#!python
sage: S3 = SymmetricGroupAlgebra(QQ, 3)
sage: S3._coercions_used
False
sage: S3.algebra_generators()
[[2, 1, 3], [2, 3, 1]]
sage: S3._coercions_used
True
}}}
Apply: [attachment:trac_15309-sga_alg_gens_fix-ts.patch]
--
Comment (by tscrim):
Hey Darij,
I'm somewhat surprised I get a 2x speedup; that's good to know for future
reference.
I've folded in your review patch (it applied with some fuzz 2), but made
one change. Instead of `return self.monomial(self._one)`, I changed it to
`return self.one()`. If you're happy with the patch, then it's positive
review.
Best,[[BR]]
Travis
For patchbot:
Apply: trac_15309-sga_alg_gens_fix-ts.patch
--
Ticket URL: <http://trac.sagemath.org/ticket/15309#comment:6>
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/groups/opt_out.