-
Notifications
You must be signed in to change notification settings - Fork 51
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
Export AbstractSparseMatrixCSC + interface #395
base: main
Are you sure you want to change the base?
Conversation
AbstractSparseMatrixCSC interface. See discussion on JuliaSparse#265
a SparseMatrixCSC, but would not. See JuliaSparse#265 (comment)
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #395 +/- ##
==========================================
+ Coverage 84.13% 84.30% +0.17%
==========================================
Files 12 13 +1
Lines 9159 9184 +25
==========================================
+ Hits 7706 7743 +37
+ Misses 1453 1441 -12 ☔ View full report in Codecov by Sentry. |
Similar question for |
Generally, the thought with |
My concern with exporting was that wouldn't we better off with something more general? AbstractSparseMatrixCSC feels too specialized a thing as an abstract type. But of course, it isn't a huge change per se. @rayegun Any thoughts? |
Pinging @KristofferC and @fredrikekre on any thoughts here. Another set of eyes would be good here. While I don't see a major issue, a public API would be a big commitment going forward, and AbstractSparseMatrixCSC feels like a bit of a specialized abstract class. |
... I'd like to come back to this - Something more general would of course be appreciated, as e.g. discussed in #538 . OTOH, as a matter of fact the interface is used in LinearSolve.jl, see e.g. here and here. |
@ChrisRackauckas, @oscardssmith, what do you think about this ? |
I think we need to write down what that expected interface is if you're going to consider it public. Like https://docs.julialang.org/en/v1/manual/interfaces/ . Can you try doing a first draft of it? Maybe @mbauman and @timholy would be good to have on-board as well since they drafted the original array interface and I know they have comments on what a sparse array interface would need to have. |
Do The deepest thinking I've done on a real interface for sparse arrays of all kinds is in https://github.com/timholy/ArrayIteration.jl (unfinished and effectively abandoned for lack of time). That interface is not so tightly coupled to a particular internal representation. A good start is to ask yourself the question, "what is needed to write algorithms on sparse matrices even if I don't know how they are stored?" |
... Certainly, as CSR matrix should have getrowptr and not getcolptr... I see two strands of discussion here (as I tried to outline in #559):
IMHO, both levels of interfaces should (and can) coexist. |
See discussion in #265