Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there any storage optimized Sparse Matrix implementations in C#?

Are there any storage optimized Sparse Matrix implementations in C#?

like image 543
luvieere Avatar asked Nov 28 '09 11:11

luvieere


People also ask

How do you store sparse matrix efficiently?

A sparse matrix can be stored in full-matrix storage mode or a packed storage mode. When a sparse matrix is stored in full-matrix storage mode, all its elements, including its zero elements, are stored in an array.

Is sparse matrix memory efficient?

Sparse matrices are often stored in compressed sparse row (CSR) format, which stores values and column indices of all elements in two separate arrays where elements of each row are stored continuously in memory. Row starts are stored in a third array which enables efficient access to sparse rows.

What is a sparse matrix How is it stored in the memory of a computer?

If most of the elements of the matrix have 0 value, then it is called a sparse matrix. Why to use Sparse Matrix instead of simple matrix ? Storage: There are lesser non-zero elements than zeros and thus lesser memory can be used to store only those elements.

Why does storing of sparse matrices need extra consideration?

Thus, a sparse matrix is a matrix in which the number of zeros is more than the number of non-zero elements. If we store this sparse matrix as it is, it will consume a lot of space. Therefore, we store only non-zero values in the memory in a more efficient way.


1 Answers

There is Math.NET.

It has some Spare Matrix implementations. (link is to the old Math.NET site. There is no longer an online version of the documentation).

like image 147
Amirshk Avatar answered Nov 15 '22 22:11

Amirshk