Skip to content

Always return convergence history #185

@haampie

Description

@haampie

Right now there is no way of querying whether the method is converged other than retrieving the full convergence history with log = true.

I would suggest always returning a minimal convergence history, without the resnorm array, which at least allows you to query whether it is converged and how many iterations that took. Setting log = true would then collect info during the iterations as well.

It would look like this:

julia> x, history = cg(A, b);
julia> history
Converged after 10 iterations.

Maybe we could make the history object immutable as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions