Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/factorization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -334,13 +334,13 @@ function LinearAlgebra.dot(a::Factorization, b::Factorization)
end

function LinearAlgebra.dot(a::Factorization, b::AsymmetricFactorization)
# `⟨XΛX', UΣV'⟩ = ⟨ΛX'V, X'UΣ⟩`
XtV = a.factor' * right_factor(b)
XtU = a.factor' * left_factor(b)
XtV = MA.broadcast!!(*, XtV, XtU)
XtV = _lmul_diag!!(a.scaling, XtV)
XtV = _rmul_diag!!(XtV, b.scaling)
return sum(XtV)
# `⟨XΛX', UΣV'⟩ = ⟨U'XΛ, ΣV'X⟩`
UtX = left_factor(b)' * a.factor
VtX = right_factor(b)' * a.factor
UtX = MA.broadcast!!(*, UtX, VtX)
UtX = _rmul_diag!!(XtV, a.scaling)
Comment thread
blegat marked this conversation as resolved.
Outdated
UtX = _lmul_diag!!(b.scaling, XtV)
Comment thread
blegat marked this conversation as resolved.
Outdated
return sum(UtX)
end

function _dot_mat_fact(
Expand Down