mathnet / mathnet-numerics

Math.NET Numerics
http://numerics.mathdotnet.com
MIT License
3.49k stars 897 forks source link

Feature request: DIAgonal sparse matrix storage #983

Open dbischof90 opened 1 year ago

dbischof90 commented 1 year ago

For multidimensional FDM calculations in C#, we can have more or less banded diagonal matrices. Initializing those is very handy in Python's scipy; for example see https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.diags.html

Building sparse matrices with diagonal values (and vectors) already seems to be implemented. Is it a lot of trouble to implement a more general diagonal storage?