Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Computing the matrix norm #72

Open
gflegar opened this issue Jun 18, 2018 · 6 comments
Open

Computing the matrix norm #72

gflegar opened this issue Jun 18, 2018 · 6 comments
Labels
is:enhancement An improvement of an existing feature. is:good-first-issue Good for newcomers. is:help-wanted Need ideas on how to solve this.

Comments

@gflegar
Copy link
Member

gflegar commented Jun 18, 2018

Sometimes it is beneficial to have a method that computes the norm of a matrix (or liner operator). (Currently we only have a function which computes the column-wise dot product of two dense matrices - which is enough for use in Krylov solvers, but not necessarily in all scenarios).

There are a few questions though on how we implement this:

  1. There are multiple interesting norms (1, Frobenious, infinity, etc), do we want to support all of them? And how do we design the interface for that, multiple functions, one templated function, or one function with an extra parameter?
  2. For which kinds of linear operators does it makes sense to implement the norm in the first place? Probably not for solvers. For all of the matrices it is not extremely difficult (depending on the norm). For some preconditioners (e.g block-Jacobi) it is easy, but for others it's more involved (e.g. ILU-type). Do we add it as a virtual method to LinOp, do we create a new interface which is inherited by all operators implementing it (e.g. like we have for transpose), or do we just put that as non-virtual members of the concrete linear operators implementing those?
@gflegar gflegar added the is:enhancement An improvement of an existing feature. label Jun 18, 2018
@hartwiganzt
Copy link
Collaborator

It would definitely be a nice feature! Avoiding a lot matlab stuff....
For the ILU preconditioners that you take as example, the question is whether you want the norm of the complete preconditioner or only of a single factor. Then it boils down to the matrix norm, right?

@venovako
Copy link

Ad 1. Maybe a function with an extra parameter, as done in xLANGE, e.g.,
https://github.com/Reference-LAPACK/lapack/blob/master/SRC/clange.f

@gflegar
Copy link
Member Author

gflegar commented Jun 18, 2018

@hartwiganzt with "ILU preconditioner" I was talking about the linear operator U^-1 L^-1 (this is the actual operator that is applied at every iteration), so || U^-1 L^-1 ||, which is difficult.

@tcojean
Copy link
Member

tcojean commented Oct 2, 2018

With the previous MRs #141 and related a function compute_norm2 was added for Dense matrices. We still miss a bunch of norms and this is only for Dense, but there is something.

@gflegar gflegar added the is:good-first-issue Good for newcomers. label Oct 2, 2018
@gflegar
Copy link
Member Author

gflegar commented Oct 2, 2018

@tcojean #141 does something different - it computes the norm of each column of the matrix, so the result is a row-vector of norms. This issue is a feature request for computing the norm of the entire matrix, which should produce one value for the entire matrix.

@tcojean
Copy link
Member

tcojean commented Oct 2, 2018

You are right, I should have read more carefully that this was for the whole matrix as a single entity. Maybe there is some common ground (in terms of interface?) for both though?

@tcojean tcojean added the is:help-wanted Need ideas on how to solve this. label Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:enhancement An improvement of an existing feature. is:good-first-issue Good for newcomers. is:help-wanted Need ideas on how to solve this.
Projects
None yet
Development

No branches or pull requests

4 participants