Conversation
Contributor
|
i was thinking if it's more efficient to directly replace the diagonal element of function chbmv!{T<:Complex}(w::Vector{T}, A, vec::Vector{T}, fac=factorize)
p = min(length(θ), length(α))
t = [θ; θconj]
a = 0.5 * [α; αconj]
tmp_v = similar(vec)
B = A - θ[1]*I
scale!(copy!(tmp_v, vec), a[1])
A_ldiv_B!(fac(B), tmp_v)
copy!(scale!(w, α0), tmp_v)
@inbounds for i = 2:2*p
scale!(copy!(tmp_v, vec), a[i])
for n=1:size(B,1)
B[n,n] = B[n,n] + t[i-1] - t[i]
end
A_ldiv_B!(fac(B), tmp_v)
w .+= tmp_v
end
return w
end # chbmv! |
Owner
Author
|
You are basically right. However if |
Contributor
|
ok, i see. one would need to do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As partly discussed in #20. Might still need some smoothing.