0

how to addres sparse matrix n*n dimension when stored in a single dimensional array.

2
Contributors
6
Replies
8
Views
6 Years
Discussion Span
Last Post by sydsine
0

Given an array a[M][N] , a[i][j] is logically equivalent to a[i * N + j] if the dimensions are stored in sequence.

0

no when the sparse matrix is converted to single dimension...

ex..uppertriangular matrix a[0..n-1,0..n-1] is stored in array b[0...1/2(n(n+1))-1] in lexicographical order.

find address of a[80,90] when a[0,0] is stored at b[0]. n=100

0

no

How is what I said wrong?

when the sparse matrix is converted to single dimension...

If you knew the answer, why did you waste our time in asking? By the way, your original question didn't mention converting a sparse matrix to a single dimensional array. If you had asked how to do the conversion, you would have gotten a better answer.

0

i knew its wrong as ur ans is simple addressing which is not in dis case.. if u know ans..

0

i knew its wrong as ur ans is simple addressing which is not in dis case..

You asked about addressing, and my answer was about addressing. If you want a better answer, ask a better question. That's my point, now I'll take my leave of this thread.

-2

if u can't don't regard ques as not better...if u can't ans better not reply

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.