#13742: No Permutation should be created that its method cannot handle
---------------------------------+------------------------------------------
Reporter: ncohen | Owner: sage-combinat
Type: defect | Status: needs_review
Priority: major | Milestone: sage-5.6
Component: combinatorics | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Nathann Cohen | Merged in:
Dependencies: | Stopgaps:
---------------------------------+------------------------------------------
Comment (by dimpase):
Replying to [comment:10 ncohen]:
typo;
{{{
diff --git a/sage/combinat/permutation.py b/sage/combinat/permutation.py
--- a/sage/combinat/permutation.py
+++ b/sage/combinat/permutation.py
@@ -12,7 +12,7 @@
:trac:`13742`). This is dangerous. In particular, the
:meth:`Permutation_class._left_to_right_multiply_on_right` method
(which can
be called trough multiplication) disables the input checks (see
- :method:`Permutation`). This should not happen. Do not trust the
results.
+ :meth:`Permutation`). This should not happen. Do not trust the
results.
AUTHORS:
}}}
I know the reason behind the weirdness in
{{{sage/combinat/integer_vector_weighted.py}}}. Namely, the {{{list()}}}
converts the list of list of integers into a list of (invalid)
permutations, i.e 0 and repeated entries are allowed. The need for this is
lost to me.
I've applied the following patch, and now try to run the tests to see if
something fails.
{{{
diff --git a/sage/combinat/integer_vector_weighted.py
b/sage/combinat/integer_vector_weighted.py
--- a/sage/combinat/integer_vector_weighted.py
+++ b/sage/combinat/integer_vector_weighted.py
@@ -163,5 +163,4 @@
perm = Word(self.weight).standard_permutation()
l = [x for x in sorted(self.weight)]
- return
[perm._left_to_right_multiply_on_right(Permutation_class(x, check_input =
False)) for x in self._recfun(self.n,l)]
-
+ return [perm.action(_) for _ in self._recfun(self.n,l)]
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13742#comment:11>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.