We should add a keyword argument adjacency_matrix(g, fmt=...) allowing to choose among dense and sparse matrix formats:
:coo:
- on cpu return a sparse matrix from SparseMatricesCOO.jl
if the package is loaded (otherwise error out)
- on cuda return a CUSPARSE. CuSparseMatrixCOO
- on metal and amdgpu: ?
:csc
- on cpu return SparseArrays. SparseMatrixCSC
- on cuda return CUSPARSE. CuSparseMatrixCSC
:dense: return a dense array
:nothing: maintain the current behavior (which ideally should be to choose the most sensible output format based on the graph format).
Other options (e.g. :csr could be considered in the future).
cc @dferre97
We should add a keyword argument
adjacency_matrix(g, fmt=...)allowing to choose among dense and sparse matrix formats::coo:if the package is loaded (otherwise error out)
:csc:dense: return a dense array:nothing: maintain the current behavior (which ideally should be to choose the most sensible output format based on the graph format).Other options (e.g.
:csrcould be considered in the future).cc @dferre97