JuliaStats / PDMats.jl

Uniform Interface for positive definite matrices of various structures
Other
104 stars 43 forks source link

Generalize PDMat constructor from Cholesky #155

Closed btmit closed 2 years ago

btmit commented 2 years ago

Now that #131 is merged, it's faster to construct a PDMat with an SMatrix than it is with Cholesky{T, SMatrix}. I believe this is because the constructor here creates a Matrix then here converts it to an SMatrix.

Naively, it seems like this could be improved simply by changing PDMat(fac::Cholesky) = PDMat(Matrix(fac), fac) to PDMat(fac::Cholesky) = PDMat(AbstractMatrix(fac), fac) in pdmat.jl