nathanaelbosch / PSDMatrices.jl

Positive semi-definite matrix types in Julia

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

todense() vs collect() (vs. Matrix())

pnkraemer opened this issue · comments

Currently, there is a todense() function (that is mostly used for testing).

The more julia-esque implementation might be collect(). One could also do Matrix(), but at the moment, I think it is better to not do this because Matrix() would implement fallbacks for almost all operations we would like to do, and having fallback implementations makes it really difficult to write tests.

Also, their collect uses getindex, which kind of makes sense; the standard collect iterates over elements and adds them to a container. In our case I'd argue that that's not what is happening?

Apparently full is outdated: https://discourse.julialang.org/t/sparse-to-dense-matrix/8380/14 (I have also never seen it so far)