开发者

linked representation of sparse matrices

开发者 https://www.devze.com 2023-02-22 04:55 出处:网络
for sparse matrices i had put a question about its linked representation. there were two lists to be implemented for a nine zero elements of a 5x8 matrix.....one is the coloumn list and another one is

for sparse matrices i had put a question about its linked representation. there were two lists to be implemented for a nine zero elements of a 5x8 matrix.....one is the coloumn list and another one is the row list..... now here is a problem both the lists have开发者_如何转开发 properties as follows: 1) row list:- row,col,data,right 2) coloumn list:-row,col,data,down

the link is through either the down or right field

i have created a sparse matrice as follows:

_1_2_3_4_5_6_7_8_ 1| 1 0 0 0 0 6 0 9 2| 0 2 0 0 0 0 7 0

3| 0 0 3 0 0 0 0 8 4| 0 0 0 4 0 0 0 0 5| 0 0 0 0 5 0 0 0

i googled around and finally got some representation in ibm site

but the real headache for me is i am just not getting enough help how to represent the elements as in both the list. should both the list contain all 9 non zero elements? can anybody suggest something?


the link list representation of the matrix is

|5|9|9| |-> |1|1|1| | -> |1|6|6| | -> |1|8|9| | -> |2|2|2| |->|2|7|7| |-> |3|3|3| |->|3|8|8| |->|4|4|4| |->|5|5|5|null|

here first node show the total number of row and columns.the 2nd ,3rd and so on shows the the values of row, column ,nonzero values of the corresponding values.

1| 1 0 0 0 0 6 0 9 
2| 0 2 0 0 0 0 7 0
3| 0 0 3 0 0 0 0 8 
4| 0 0 0 4 0 0 0 0 
5| 0 0 0 0 5 0 0 0
0

精彩评论

暂无评论...
验证码 换一张
取 消