I want to get the next in row and next in column in the above matrix.
Index column represent the all non zero entries in the matrix.
For an example if you are at A(1,1) it shoud give me the index for -2 from the index colum and update next in row to 2. Because -2 is index 2 in the index column. For next in colum at A(1,1) it should get the index from index column for 2 so the next in column will be 3.
When you are at A(2,1). The next in row is 8. this should give me 4 from index column (because 8 is the 4th non zero entry in the matrix), for next in column it should give me 10 from index colum because 1 is the 10th non zero entry of the matrix.
Please give me a hint