
Hi,
I need to represent and solve a tridiagonal matrix.
Do Math.Net Numerics have an efficient way to represent and solve this kind of matrix or should be represented and solved as a generic matrix?
Thanks


Coordinator
Dec 19, 2013 at 8:49 AM
Edited Dec 19, 2013 at 8:49 AM

Hi
Although we have a specialized diagonal matrix type, there is none for tridiagonal matrices.
In recent v3 alpha versions, if the matrix is small, I'd start with dense matrices and use a factorization to solve (i.e.
Matrix.Solve methods). If it is large then I'd start with a sparse matrix and iterative solvers (i.e.
Matrix.SolveIterative methods). If dense you may want to consider using our native provider.
But you may want to do some benchmarks with your specific use case to find out what works best.
Thanks,
Christoph


Coordinator
Dec 19, 2013 at 8:55 AM
Edited Dec 19, 2013 at 8:55 AM

NB: there are very efficient algorithms to directly solve tridiagonal matrix problems, we probably should consider to better support this common case.



Thanks Christoph for your reply.
Since the library does not support this specific case I am considering to implement by myself this
algorithm.
It seems simple and efficient

