N
N
Nikolai Shepelev2015-10-20 20:25:56
Programming
Nikolai Shepelev, 2015-10-20 20:25:56

"Sparse Matrix Paired". What is it like?

In general, I came across a problem, there was this concept, maybe someone came across this and knows what it is?
An internet search turned up nothing of the sort.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mintormo, 2015-10-20
@venomkol

I didn’t come across it myself, but a simple search on the wiki gave an article . It also contains a sentence that gives the key to understanding: "One of the possible storage options is by rows. Each row contains a list of non-zero elements and a list of their indices.". Let's say we have a matrix like this:

1, 0, 0, 5, 0 -1
7, 2, 0, 1, 1, 0
0, 0, 0, 5, 6, 1

it can be rewritten as a matrix consisting of pairs (vectors):
(0,1),(3,5),(5,-1)
(0,7),(1,2),(3,1),(4,1)
(3,5),(4,6),(5,1)

where the first number is the column number in the row (counting from zero), and the second is the number itself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question