JuliaApproximation / ApproxFunBase.jl

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

Improve inference in axpy for non-inferred operator #522

Closed jishnub closed 1 year ago

jishnub commented 1 year ago

The following is type-inferred after this:

julia> d1, r1 = Legendre(), Jacobi(2,2);

julia> d2, r2 = Chebyshev(), Chebyshev();

julia> K = (Operator(I, d1) ⊗ Operator(I, d2)) → (r1 ⊗ r2);

julia> @inferred BandedBlockBandedMatrix(view(K, Block(1):Block(2), Block(1):Block(2)))
2×2-blocked 3×3 BandedBlockBandedMatrix{Float64, BlockArrays.PseudoBlockMatrix{Float64, Matrix{Float64}, Tuple{BlockArrays.BlockedUnitRange{Vector{Int64}}, BlockArrays.BlockedUnitRange{Vector{Int64}}}}, BlockArrays.BlockedUnitRange{Vector{Int64}}}:
 1.0  │  0.0  0.0     
 ─────┼───────────────
  ⋅   │  1.0  0.0     
  ⋅   │   ⋅   0.333333
codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 69.84% and project coverage change: -44.46% :warning:

Comparison is base (4f33475) 71.88% compared to head (1b0e6df) 27.42%. Report is 13 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #522 +/- ## =========================================== - Coverage 71.88% 27.42% -44.46% =========================================== Files 81 80 -1 Lines 8546 8362 -184 =========================================== - Hits 6143 2293 -3850 - Misses 2403 6069 +3666 ``` | [Files Changed](https://app.codecov.io/gh/JuliaApproximation/ApproxFunBase.jl/pull/522?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaApproximation) | Coverage Δ | | |---|---|---| | [src/ApproxFunBase.jl](https://app.codecov.io/gh/JuliaApproximation/ApproxFunBase.jl/pull/522?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaApproximation#diff-c3JjL0FwcHJveEZ1bkJhc2Uuamw=) | `44.00% <ø> (-40.00%)` | :arrow_down: | | [src/Operators/SubOperator.jl](https://app.codecov.io/gh/JuliaApproximation/ApproxFunBase.jl/pull/522?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaApproximation#diff-c3JjL09wZXJhdG9ycy9TdWJPcGVyYXRvci5qbA==) | `42.64% <0.00%> (-41.18%)` | :arrow_down: | | [src/Operators/banded/CalculusOperator.jl](https://app.codecov.io/gh/JuliaApproximation/ApproxFunBase.jl/pull/522?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaApproximation#diff-c3JjL09wZXJhdG9ycy9iYW5kZWQvQ2FsY3VsdXNPcGVyYXRvci5qbA==) | `17.35% <0.00%> (-58.46%)` | :arrow_down: | | [src/Operators/banded/Conversion.jl](https://app.codecov.io/gh/JuliaApproximation/ApproxFunBase.jl/pull/522?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaApproximation#diff-c3JjL09wZXJhdG9ycy9iYW5kZWQvQ29udmVyc2lvbi5qbA==) | `22.95% <0.00%> (-63.49%)` | :arrow_down: | | [src/Spaces/ProductSpaceOperators.jl](https://app.codecov.io/gh/JuliaApproximation/ApproxFunBase.jl/pull/522?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaApproximation#diff-c3JjL1NwYWNlcy9Qcm9kdWN0U3BhY2VPcGVyYXRvcnMuamw=) | `0.00% <0.00%> (-65.37%)` | :arrow_down: | | [src/eigen.jl](https://app.codecov.io/gh/JuliaApproximation/ApproxFunBase.jl/pull/522?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaApproximation#diff-c3JjL2VpZ2VuLmps) | `0.00% <0.00%> (-96.43%)` | :arrow_down: | | [src/Fun.jl](https://app.codecov.io/gh/JuliaApproximation/ApproxFunBase.jl/pull/522?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaApproximation#diff-c3JjL0Z1bi5qbA==) | `36.17% <50.00%> (-31.62%)` | :arrow_down: | | [src/Operators/general/InterlaceOperator.jl](https://app.codecov.io/gh/JuliaApproximation/ApproxFunBase.jl/pull/522?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaApproximation#diff-c3JjL09wZXJhdG9ycy9nZW5lcmFsL0ludGVybGFjZU9wZXJhdG9yLmps) | `23.46% <66.66%> (-57.87%)` | :arrow_down: | | [src/LinearAlgebra/helper.jl](https://app.codecov.io/gh/JuliaApproximation/ApproxFunBase.jl/pull/522?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaApproximation#diff-c3JjL0xpbmVhckFsZ2VicmEvaGVscGVyLmps) | `55.58% <100.00%> (-13.35%)` | :arrow_down: | | [src/Multivariate/TensorSpace.jl](https://app.codecov.io/gh/JuliaApproximation/ApproxFunBase.jl/pull/522?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaApproximation#diff-c3JjL011bHRpdmFyaWF0ZS9UZW5zb3JTcGFjZS5qbA==) | `39.83% <100.00%> (-45.34%)` | :arrow_down: | | ... and [3 more](https://app.codecov.io/gh/JuliaApproximation/ApproxFunBase.jl/pull/522?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaApproximation) | | ... and [59 files with indirect coverage changes](https://app.codecov.io/gh/JuliaApproximation/ApproxFunBase.jl/pull/522/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.