Skip to content

rdiv! for TriangularRFP #18

@dmbates

Description

@dmbates
Contributor

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.

Activity

dmbates

dmbates commented on Mar 19, 2025

@dmbates
ContributorAuthor

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

andreasnoack commented on Mar 19, 2025

@andreasnoack
Member

Yeah. I think that is probably a mistake.

dmbates

dmbates commented on Mar 19, 2025

@dmbates
ContributorAuthor

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

andreasnoack commented on Mar 19, 2025

@andreasnoack
Member

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

dmbates

dmbates commented on Mar 20, 2025

@dmbates
ContributorAuthor

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

andreasnoack

andreasnoack commented on Mar 21, 2025

@andreasnoack
Member

Fixed in #19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

        Participants

        @dmbates@andreasnoack

        Issue actions

          rdiv! for TriangularRFP · Issue #18 · JuliaLinearAlgebra/RectangularFullPacked.jl