SparseArrays.jl icon indicating copy to clipboard operation
SparseArrays.jl copied to clipboard

Document which operations are required for a SparseArray eltype

Open LilithHafner opened this issue 2 years ago • 1 comments

getindex on structural zeros uses zero(T). setindex!, dropzeros!, and == use iszero(T).

It would be nice to know which operations are required for full functionality for SparseArrays, and what subset of that functionality is available if some or all of those operations are missing. For example, do I need to define zero or iszero on my custom type T to support sparse matrix multiplication wth eltype T?

LilithHafner avatar Dec 01 '22 01:12 LilithHafner

This has mostly evolved over time. So it would be great to document what we need.

ViralBShah avatar Dec 01 '22 17:12 ViralBShah