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

inv is broken for Bidiagonal #173

Closed
jakebolewski opened this issue Feb 2, 2015 · 7 comments · Fixed by JuliaLang/julia#10099
Closed

inv is broken for Bidiagonal #173

jakebolewski opened this issue Feb 2, 2015 · 7 comments · Fixed by JuliaLang/julia#10099

Comments

@jakebolewski
Copy link
Member

This fails in factorize:

Ex

julia> BD
5x5 Base.LinAlg.Bidiagonal{Float64}:
 -2.33818   0.0160447  0.0        0.0        0.0
  0.0      -1.86915    0.106191   0.0        0.0
  0.0       0.0        1.65496   -0.849353   0.0
  0.0       0.0        0.0        0.246264  -0.00214547
  0.0       0.0        0.0        0.0       -1.19128

julia> inv(BD)
ERROR: MethodError: `factorize` has no method matching factorize(::Base.LinAlg.Bidiagonal{Float64})
 in inv at linalg/generic.jl:237
@tkelman
Copy link

tkelman commented Feb 3, 2015

Would be resolved by JuliaLang/julia#8240

@andreasnoack
Copy link
Member

@tkelman I don't think JuliaLang/julia#8240 is enough here. Bidiagonal matrices in LAPACK's band layout doesn't cover our present Bidiagonal layout so we would't be able to use a LAPACK routine here.

However, an inv(Bidiagonal) but the routine wouldn't be hard to write. But again, I'm not really sure we want inv(Bidiagonal). It really depends on the interpretation of the special matrices.

@tkelman
Copy link

tkelman commented Feb 3, 2015

Using lapack for bidiagonal (or tridiagonal) is pretty pointless and should not be held sacred here. I'd rather have a generic system than go out of our way to support an "optimized" path that doesn't actually matter for performance.

@andreasnoack
Copy link
Member

I think that such a system would be great, but I also think that it is bit more than what JuliaLang/julia#8240 proposes.

@jiahao
Copy link
Member

jiahao commented Feb 3, 2015

Note that the inverse of Bidiagonal will be in general Triangular.

@tkelman
Copy link

tkelman commented Feb 3, 2015

Oh right, duh, no need to convert to Tridiagonal. Just define factorize(A::Bidiagonal) = A and this should work.

@tkelman
Copy link

tkelman commented Feb 3, 2015

Also not implemented: multiplying Bidiagonal and a dense matrix

@KristofferC KristofferC transferred this issue from JuliaLang/julia Nov 26, 2024
This issue was closed.
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

Successfully merging a pull request may close this issue.

4 participants