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

Utility functions for diagonal and inverse diagonal #96

Closed
szarnyasg opened this issue Jun 21, 2020 · 1 comment
Closed

Utility functions for diagonal and inverse diagonal #96

szarnyasg opened this issue Jun 21, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@szarnyasg
Copy link
Contributor

szarnyasg commented Jun 21, 2020

Related to #94, it would be useful to have functions for diag (for turning a vector into a diagonal matrix) and diag^{-1} (for extracting the diagonal elements of a matrix).
These could be called LAGraph_diag(GrB_Matrix* A, GrB_Vector d) and LAGraph_inv_diag(GrB_Vector &d, GrB_Matrix A, boolean diagonal_only) (diagonal_only denoting whether matrix A only has diagonal elements, which makes the extraction trivial).

@szarnyasg szarnyasg self-assigned this Jun 21, 2020
@szarnyasg szarnyasg added the enhancement New feature or request label Jun 22, 2020
@DrTimothyAldenDavis
Copy link
Member

One of these is now in the spec (GrB_Matrix_diag, to build a matrix from a diagonal). The opposite, GxB_Vector_diag, to extract a diagonal from a matrix, is in SuiteSparse as a GxB method, but is not in the spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants