JuliaIntervals / IntervalLinearAlgebra.jl

Linear algebra done rigorously
MIT License
36 stars 9 forks source link

Fix complex matrix multiplication #133

Closed orkolorko closed 1 year ago

orkolorko commented 1 year ago

PR description

We define new methods so that multiplication with complex interval matrices is correctly dispatched

Before

The compiler dispatched to the slow multiplication method

After

The matrix product with complex matrices is dispatched correctly and uses the multiplication function exported by IntervalLinearAlgebra

Related issues

Checklist

codecov-commenter commented 1 year ago

Codecov Report

Base: 97.19% // Head: 97.24% // Increases project coverage by +0.05% :tada:

Coverage data is based on head (fe5b388) compared to base (fe87dd4). Patch coverage: 100.00% of modified lines in pull request are covered.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #133 +/- ## ========================================== + Coverage 97.19% 97.24% +0.05% ========================================== Files 17 17 Lines 642 654 +12 ========================================== + Hits 624 636 +12 Misses 18 18 ``` | [Impacted Files](https://codecov.io/gh/JuliaIntervals/IntervalLinearAlgebra.jl/pull/133?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaIntervals) | Coverage Δ | | |---|---|---| | [src/multiplication.jl](https://codecov.io/gh/JuliaIntervals/IntervalLinearAlgebra.jl/pull/133?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaIntervals#diff-c3JjL211bHRpcGxpY2F0aW9uLmps) | `100.00% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaIntervals). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaIntervals)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

orkolorko commented 1 year ago

I know that it is not an optimal solution; as we already discussed, the best line of work would be to define a new type with midpoint-radius matrices (and then store the real and imaginary part as two of these matrices), but this is a temporary fix. I'm working on the midpoint-radius types, but I thought that making a temporary fix would be useful.

lucaferranti commented 1 year ago

Indeed, to avoid ambiguities and type piracy we want a dedicated type. This fix definitely does not hurt though, so it's very welcome

lucaferranti commented 1 year ago

btw @orkolorko, feel free to also write me on the julia slack or zulip (I am Luca Ferranti on both and same profile picture of github) to discuss more about ILA development

We could have a short video chat to discuss future directions of IntervalLinearAlgebra.jl (dont take this as an expectation of commitment, I'd simply be interested in hearing more what you are using the package for and how I can help you in the development)

lucaferranti commented 1 year ago

this will probably become outdated once we introduce MidRadMatrix, but for now it's good to have