Talk:Permutations by swapping: Difference between revisions

→‎Alternative Perl6 version: I remove this: it does not work properly
(→‎Python code issues: new section)
(→‎Alternative Perl6 version: I remove this: it does not work properly)
 
(8 intermediate revisions by 3 users not shown)
Line 40:
# Replace the main section of spermutations.py with <code>for x in spermutations(range(3)): print(x)</code>, and run it. How many lines should it produce?
--[[User:Ledrug|Ledrug]] 19:27, 4 August 2012 (UTC)
 
:Hi Ledrug,
:# Its straight forward to see how that particular equation for a determinant is derived. That way of defining what a determinant ''is'' is still in use. Just like people are told about efficiency issues with the recursive method of calculating a factorial, but the recursive method of calculating a factorial has other legit uses. Computational efficiency has its place but is not all, and yes I do know that that particular method of calculating a determinant is inefficient. I did not say otherwise.
:# And the others: My original versions of both programs worked together (Python 2.7). There have been edits since, I'll check (probably within the next day) - Thanks.
:--[[User:Paddy3118|Paddy3118]] 21:08, 4 August 2012 (UTC)
:: No it's not about making this method the most efficient for matrices, it's about why mentioning matrix -- or anything -- at all. You have four things in this task: generate all permutations; list parity for each; use swap only; apply to matrices. The first two are interesting enough, but there's no reason they can't be just included in the existing [[Permutations]] task, with or without the swapping requirement; the determinant thing is a nobrainer given the first two, particularly since it's not even a good method. To make it worse, it's questionable if the code under "recursive" heading can even be called a swapping method. Basically, I don't see why this task merits being a, well, task, instead of just a subheading under [[Permutations]]. --[[User:Ledrug|Ledrug]]
 
::We differ. That can be good. Try looking a little deeper and seeing if the author might not be trying to pull a fast one on you and cut them some slack. Or not. --[[User:Paddy3118|Paddy3118]] 03:17, 5 August 2012 (UTC)
 
:Yep Ledrug, although its use in the other task is mentioned, somone made a well-meaning change to the functions interfacethat broke things. I have removed that change as it was quickest, but I should probably update the Matrix task in the future. --[[User:Paddy3118|Paddy3118]] 21:45, 4 August 2012 (UTC)
1,934

edits