Skip to content

Commit

Permalink
Merge remote-tracking branch 'torfjelde/torfjelde/cholesky' into torf…
Browse files Browse the repository at this point in the history
…jelde/cholesky
  • Loading branch information
torfjelde committed Sep 8, 2023
2 parents 2b2e395 + 0a27f7a commit bc04c80
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/nonstandard.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,16 @@ constructorof(::Type{<:Expr}) = (head, args) -> Expr(head, args...)::Expr

### Cholesky
setproperties(C::LinearAlgebra.Cholesky, patch::NamedTuple{()}) = C
function setproperties(C::LinearAlgebra.Cholesky, patch::NamedTuple{(:L,),Tuple{L}}) where {L<:LinearAlgebra.LowerTriangular}
return LinearAlgebra.Cholesky(C.uplo === 'U' ? copy(transpose(patch.L.data)) : patch.L.data, C.uplo, C.info)
function setproperties(C::LinearAlgebra.Cholesky, patch::NamedTuple{(:L,),Tuple{<:LinearAlgebra.LowerTriangular}})
return LinearAlgebra.Cholesky(C.uplo === 'U' ? copy(patch.L.data') : patch.L.data, C.uplo, C.info)
end
function setproperties(C::LinearAlgebra.Cholesky, patch::NamedTuple{(:U,),Tuple{U}}) where {U<:LinearAlgebra.UpperTriangular}
return LinearAlgebra.Cholesky(C.uplo === 'L' ? copy(transpose(patch.U.data)) : patch.U.data, C.uplo, C.info)
function setproperties(C::LinearAlgebra.Cholesky, patch::NamedTuple{(:U,),Tuple{<:LinearAlgebra.UpperTriangular}})
return LinearAlgebra.Cholesky(C.uplo === 'L' ? copy(patch.U.data') : patch.U.data, C.uplo, C.info)
end
function setproperties(
C::LinearAlgebra.Cholesky,
patch::NamedTuple{(:UL,),Tuple{UL}}
) where {UL<:Union{LinearAlgebra.LowerTriangular,LinearAlgebra.UpperTriangular}}
patch::NamedTuple{(:UL,),Tuple{<:Union{LinearAlgebra.LowerTriangular,LinearAlgebra.UpperTriangular}}}
)
return LinearAlgebra.Cholesky(patch.UL.data, C.uplo, C.info)
end
function setproperties(C::LinearAlgebra.Cholesky, patch::NamedTuple)
Expand Down

0 comments on commit bc04c80

Please sign in to comment.