JuliaLinearAlgebra / IterativeSolvers.jl

Iterative algorithms for solving linear systems, eigensystems, and singular value problems
MIT License
401 stars 106 forks source link

Make convergence history show a summary #182

Closed haampie closed 6 years ago

haampie commented 6 years ago

Not sure why we didn't have this earlier.

This PR:

> cg(rand(4,4), rand(4), log = true)
([-3.22485, -2.92047, 11.985, -11.0404], Not converged after 4 iterations.)

Previously:

> cg(rand(4,4), rand(4), log = true)
([0.809221, -1.30579, 0.895052, 0.603624], IterativeSolvers.ConvergenceHistory{true,Void}(4, 0, 4, nothing, false, Dict{Symbol,Any}(Pair{Symbol,Any}(:tol, 1.49012e-8),Pair{Symbol,Any}(:resnorm, [0.510782, 0.319723, 0.294374, 0.832637]))))