About LU factorization
|
06-05-2015, 08:38 PM
Post: #23
|
|||
|
|||
RE: About LU factorization
(06-05-2015 08:15 PM)salvomic Wrote: Given the permutation matrix (by LU), like [1,3,2] is there a way to obtain the actual permutation matrix (like P21 = [[0,1,0], [1,0,0], [0,0,1]] ? To get the permutation matrix, simply create an NxN matrix with all zeros, and for each row, take a number off the list, and put a 1 in the corresponding column. For example: [ 1 , 3 , 2 ] --> Put a 1 in the 1st column on row 1, on row 2 put it in the 3rd column, and on the 3rd row put it in the 2nd column. You'll get [[ 1 0 0 ] [0 0 1] [0 1 0]], which is what you are looking for. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)