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

Stop using StidedMatrix?

Open oxinabox opened this issue 5 years ago • 1 comments

StridedMatrix is a annoying impossible extend union type. it is not too hard for a custom array type to implement all the required methods. (especially if it is a wrapper type that just delegates them all),

However it is not possible for a new type to join a Union.

I suggest that all dispatches on StridedMatrix in the package be replaced with AbstractMatrix. If that throws an error deeper in the code because they hit some method that actually needs a StridedMatrix and they don't have the methods needed then so be it.

oxinabox avatar Jun 06 '19 20:06 oxinabox

A specific example that would benefit from this change:

n = 8
a = rand(n, n)
a = PDMat(a * a')

b = UpperTriangular(rand(n, n))
X_A_Xt(a, b)

should be faster than

X_A_Xt(a, Matrix(b))

btmit avatar Feb 12 '21 01:02 btmit

Was fixed by #163.

devmotion avatar Sep 25 '23 12:09 devmotion