Skip to content

rdiv! for TriangularRFP #18

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

Closed
dmbates opened this issue Mar 18, 2025 · 6 comments
Closed

rdiv! for TriangularRFP #18

dmbates opened this issue Mar 18, 2025 · 6 comments

Comments

@dmbates
Copy link
Contributor

dmbates commented Mar 18, 2025

I just noticed that we have an ldiv! method for TriangularRFP but not an rdiv! method. Of course, the one I need right now is rdiv!. I will prepare a PR to add it.

@dmbates
Copy link
Contributor Author

dmbates commented Mar 19, 2025

Shouldn't the definition of the ldiv! method be for LinearAlgebra.ldiv! like the methods for LinearAlgebra.inv! or is ldiv! only intended for use in the next method definition for (\)?

@andreasnoack
Copy link
Member

Yeah. I think that is probably a mistake.

@dmbates
Copy link
Contributor Author

dmbates commented Mar 19, 2025

I think I have a PR working but ran into problems setting up tests for the rdiv! methods. I used code similar to the tests for rmul! and lmul! with modifications to ensure that the Matrix versions had A as LowerTriangular or UpperTriangular as warranted. I got errors of the form

  MethodError: no method matching rdiv!(::Vector{ComplexF32}, ::UpperTriangular{ComplexF32, Matrix{ComplexF32}})
  The function `rdiv!` exists, but no method is defined for this combination of argument types.

Is there a reason that these methods for rdiv! don't exist?

@andreasnoack
Copy link
Member

I guess it is because the vector is considered a column so it would only work when the triangular matrix is 1x1

@dmbates
Copy link
Contributor Author

dmbates commented Mar 20, 2025

It was a good thing that this test did cause an error because my test was wrong. 😑

@andreasnoack
Copy link
Member

Fixed in #19

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

2 participants