Skip to content

Commit

Permalink
Use a copy! instead of copy in DIOM
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison committed Oct 14, 2018
1 parent 1e5569b commit 3ab0c65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/diom.jl
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ function diom{T <: Number}(A :: AbstractLinearOperator, b :: AbstractVector{T};

# Update x_old and residual norm.
if !p[next_pos]
x_old = copy(x)
copy!(x_old, x)
# ‖ b - Axₘ ‖ = hₘ₊₁.ₘ * |ξₘ / uₘ.ₘ| without pivoting
rNorm = H[1] * abs/ H[2])
else
Expand Down

0 comments on commit 3ab0c65

Please sign in to comment.