Skip to content

define isapprox for Factorizations #857

Open
@oxinabox

Description

@oxinabox

isapprox is defined for Numbers and AbstractArrays.
Factorizations are very closely related to AbstractArrays.

I think there is a strong case to be made for them also defining isapprox.

Probably the way to do this is something like

isapprox(f1::Factorization, F2::Factorization; kwargs...) = (f1 == f2) || isapprox(Matrix(f1), Matrix(f2); kwargs...)

I think we need to densify the factorization if we are going to support rtol/atol using norm.
But we can avoid that if they are exactly equal.
Maybe also someone is smart and can workout some bounds that less us avoid it if the factors are close enough

(Though right now == is pretty broken: JuliaLang/julia#41228, JuliaLang/julia#41363)

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