JuliaApproximation / ApproxFunBase.jl

Core functionality of ApproxFun
MIT License
12 stars 13 forks source link

Improve type-inference in multiplying with TimesOperator #587

Closed jishnub closed 11 months ago

jishnub commented 11 months ago

This makes the following type-inferred:

julia> M = Multiplication(Fun(),Chebyshev());

julia> @inferred M * M * M
TimesOperator : Chebyshev() → Chebyshev()
 0.0   0.375  0.0    0.125   ⋅      ⋅      ⋅      ⋅      ⋅      ⋅     ⋅
 0.75  0.0    0.5    0.0    0.125   ⋅      ⋅      ⋅      ⋅      ⋅     ⋅
 0.0   0.5    0.0    0.375  0.0    0.125   ⋅      ⋅      ⋅      ⋅     ⋅
 0.25  0.0    0.375  0.0    0.375  0.0    0.125   ⋅      ⋅      ⋅     ⋅
  ⋅    0.125  0.0    0.375  0.0    0.375  0.0    0.125   ⋅      ⋅     ⋅
  ⋅     ⋅     0.125  0.0    0.375  0.0    0.375  0.0    0.125   ⋅     ⋅
  ⋅     ⋅      ⋅     0.125  0.0    0.375  0.0    0.375  0.0    0.125  ⋅
  ⋅     ⋅      ⋅      ⋅     0.125  0.0    0.375  0.0    0.375  0.0    ⋱
  ⋅     ⋅      ⋅      ⋅      ⋅     0.125  0.0    0.375  0.0    0.375  ⋱
  ⋅     ⋅      ⋅      ⋅      ⋅      ⋅     0.125  0.0    0.375  0.0    ⋱
  ⋅     ⋅      ⋅      ⋅      ⋅      ⋅      ⋅      ⋱      ⋱      ⋱     ⋱
codecov[bot] commented 11 months ago

Codecov Report

Patch coverage: 88.88% and project coverage change: +13.38% :tada:

Comparison is base (5bfe08f) 57.83% compared to head (d277c3a) 71.22%. Report is 2 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #587 +/- ## =========================================== + Coverage 57.83% 71.22% +13.38% =========================================== Files 80 80 Lines 8330 8381 +51 =========================================== + Hits 4818 5969 +1151 + Misses 3512 2412 -1100 ``` | [Files Changed](https://app.codecov.io/gh/JuliaApproximation/ApproxFunBase.jl/pull/587?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaApproximation) | Coverage Δ | | |---|---|---| | [src/Operators/general/algebra.jl](https://app.codecov.io/gh/JuliaApproximation/ApproxFunBase.jl/pull/587?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaApproximation#diff-c3JjL09wZXJhdG9ycy9nZW5lcmFsL2FsZ2VicmEuamw=) | `88.15% <87.50%> (+4.91%)` | :arrow_up: | | [src/Operators/banded/Multiplication.jl](https://app.codecov.io/gh/JuliaApproximation/ApproxFunBase.jl/pull/587?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaApproximation#diff-c3JjL09wZXJhdG9ycy9iYW5kZWQvTXVsdGlwbGljYXRpb24uamw=) | `77.77% <100.00%> (+2.46%)` | :arrow_up: | ... and [55 files with indirect coverage changes](https://app.codecov.io/gh/JuliaApproximation/ApproxFunBase.jl/pull/587/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaApproximation)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.