Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

define isapprox for Factorizations #857

Open
oxinabox opened this issue Jun 25, 2021 · 0 comments
Open

define isapprox for Factorizations #857

oxinabox opened this issue Jun 25, 2021 · 0 comments

Comments

@oxinabox
Copy link
Contributor

oxinabox commented Jun 25, 2021

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)

@KristofferC KristofferC transferred this issue from JuliaLang/julia Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant