permanent of square matrix
|
01-24-2024, 04:03 PM
(This post was last modified: 01-24-2024 04:05 PM by John Keith.)
Post: #10
|
|||
|
|||
RE: permanent of square matrix
I noticed an inefficiency in the original Python program which has carried through our subsequent programs. This line, v -= 2*d[j]*M[j] results in an array (or list) multiplication in every iteration. If the matrix is multiplied by 2 (after computing the column sums), we can add the currently selected row to v if k MOD 4 = 3, else subtract it. I have updated my RPL program in post #5 to reflect this change, which results in a 33% speedup.
|
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)