You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently accessing the lower triangular portion of a Cholesky object which has been stored using its upper triangle (or vice-versa) will return a copy
The logical solution is that it should return an Adjoint object. However this would no longer be type-stable, since the flag is stored as a value part of the Cholesky struct.
Possible solutions:
a) include the flag as part of the type parameter, either directly as a symbol, or store the factor field as a LowerTriangular/UpperTriangular.
b) get rid of the option and only ever store it as an UpperTriangular matrix.
The text was updated successfully, but these errors were encountered:
Currently accessing the lower triangular portion of a
Cholesky
object which has been stored using its upper triangle (or vice-versa) will return a copyjulia/stdlib/LinearAlgebra/src/cholesky.jl
Lines 342 to 350 in c887c74
To avoid unnecessary allocations, you end up with code that looks like this:
https://github.com/JuliaStats/PDMats.jl/blob/eeec1c1bfdddb8f522952f81b3f6a3d5ec8aa7bd/src/pdmat.jl#L57-L59
The logical solution is that it should return an
Adjoint
object. However this would no longer be type-stable, since the flag is stored as a value part of theCholesky
struct.Possible solutions:
a) include the flag as part of the type parameter, either directly as a symbol, or store the
factor
field as aLowerTriangular
/UpperTriangular
.b) get rid of the option and only ever store it as an
UpperTriangular
matrix.The text was updated successfully, but these errors were encountered: