Support for a band matrix

Issue #73 new
Marcin Copik created an issue

Blaze implements adaptors to distinguish diagonal and triangular matrices but there is no separate type for a band(ed) matrix. Right now one has to use a sparse matrix to store the diagonal and (few) off-diagonals. Diagonal matrix may be extended to hold a band matrix instead (diagonal is indeed a subtype of band matrix).

The motivation here is simple:

  • it's much easier to use and import data (e.g. tridiagonal matrix loaded from file) rather than use a sparse matrix
  • contrary to a sparse matrix, the structure is fixed and one can use that for optimized operations rather than look for coordinates on runtime
  • there are BLAS and LAPACK routines for operations on band matrices, maybe Blaze would benefit from using them?

It is a rather low priority enhancement for Blaze. Unless there is a better solution which is already implemented, I'm going to use Blaze compressed matrices for tridiagonal storage in near future.

Comments (4)

  1. Klaus Iglberger

    Hi Marcin!

    Thanks a lot for the great proposal. Since we have had band matrices on our minds for quite some time, we can promise that we will integrate them. What we cannot give is an estimate when they will be available. Till then it is probably best to use CompressedMatrix.

    Best regards,

    Klaus!

  2. Log in to comment