Opened 10 years ago
Closed 10 years ago
#10911 closed defect (fixed)
inverse() method for permutation group elements
Reported by: | rbeezer | Owned by: | joyner |
---|---|---|---|
Priority: | minor | Milestone: | sage-4.7 |
Component: | group theory | Keywords: | |
Cc: | kcrisman | Merged in: | sage-4.7.alpha3 |
Authors: | Rob Beezer | Reviewers: | Robert Bradshaw |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
Patch aims to resolve the following inconsistency, by providing a .inverse()
method for permutation group elements.
sage: S = SymmetricGroup(4) sage: s = S("(1,2,3)") sage: type(s) <type 'sage.groups.perm_gps.permgroup_element.PermutationGroupElement'> sage: s^-1 (1,3,2) sage: s.inverse() (1,3,2) sage: A = AlternatingGroup(4) sage: a = A("(1,2,3)") sage: type(a) <type 'sage.groups.perm_gps.permgroup_element.PermutationGroupElement'> sage: a^-1 (1,3,2) sage: a.inverse() --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <snip> AttributeError: 'sage.groups.perm_gps.permgroup_element.PermutationGroupElement' object has no attribute 'inverse'
Some discussion at http://groups.google.com/group/sage-devel/browse_thread/thread/683315261a6c6def
Apply trac_10911-inverses-permutation-group-v2.patch
Attachments (2)
Change History (9)
Changed 10 years ago by
comment:1 Changed 10 years ago by
- Status changed from new to needs_review
comment:2 Changed 10 years ago by
- Cc kcrisman added
comment:3 follow-up: ↓ 4 Changed 10 years ago by
- Status changed from needs_review to needs_work
Changed 10 years ago by
comment:4 in reply to: ↑ 3 Changed 10 years ago by
- Description modified (diff)
- Status changed from needs_work to needs_review
Replying to robertwb:
Calling
self.__invert__()
is slow, use~self
instead.
Thanks, Robert. v2 patch has the suggested change.
Rob
comment:5 Changed 10 years ago by
- Status changed from needs_review to positive_review
Looks good to me.
comment:6 Changed 10 years ago by
- Reviewers set to Robert Bradshaw
comment:7 Changed 10 years ago by
- Merged in set to sage-4.7.alpha3
- Resolution set to fixed
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
Calling
self.__invert__()
is slow, use~self
instead. Other than that, looks good.