-
Notifications
You must be signed in to change notification settings - Fork 55
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
defining a new AbstractSparseMatrixCSC requires defining _checkbuffers
(internal function)
#9
Comments
I agree, |
Submit a PR? |
abraemer
added a commit
to abraemer/SparseArrays.jl
that referenced
this issue
Feb 14, 2022
These methods check the assumptions on colptr, rowval and nonzeros and thus should work for all AbstractSparseMatrixCSC. Changing the signature also removes the need for every subtype to implement it. Fixes JuliaSparse#9
ViralBShah
pushed a commit
that referenced
this issue
Feb 18, 2022
These methods check the assumptions on colptr, rowval and nonzeros and thus should work for all AbstractSparseMatrixCSC. Changing the signature also removes the need for every subtype to implement it. Fixes #9
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i was in need to define my own type <:
AbstractSparseMatrixCSC
(basically i needed the indexing behaviour of aSparseMatrixCSC
, but with another storage type). The (not written in the docs) interface for anAbstractSparseMatrixCSC
requires:getcolptr
rowvals
nonzeros
size
the problem is that an internal function
_checkbuffers
is required, mainly for the display machinery. this function does not require new methods, in fact, is defined in terms of the functions mentioned above (getrowval
gets dispatched torowvals
):https://github.com/JuliaLang/julia/blob/3b5f98510368d757f468d5ea0674229a27a7c526/stdlib/SparseArrays/src/sparsematrix.jl#L82-L90
_checkbuffers
(and_goodbuffers
) should be defined in terms ofAbstractSparseMatrixCSC
instead of the concrete type.The text was updated successfully, but these errors were encountered: