Skip to content

n-d transforms #215

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

Merged
merged 3 commits into from
Sep 27, 2022
Merged

n-d transforms #215

merged 3 commits into from
Sep 27, 2022

Conversation

jishnub
Copy link
Member

@jishnub jishnub commented Sep 27, 2022

This completes the partially implemented 2D and adds nD transforms, based on Kronecker products of grids.
After this,

julia> x = Fun(); y = Fun()^2;

julia> M = values(x) .* values(y)'
2×3 Matrix{Float64}:
  0.53033   0.0   0.53033
 -0.53033  -0.0  -0.53033

julia> C = transform(Chebyshev()  Chebyshev(), M)
2×3 Matrix{Float64}:
 0.0  0.0          0.0
 0.5  7.40149e-17  0.5

julia> C  coefficients(x) .* coefficients(y)'
true

julia> itransform(Chebyshev()  Chebyshev(), C)  M
true

julia> x = Fun(); y = Fun()^2; z = Fun()^3;

julia> M = values(x) .* values(y)' .* reshape(values(z), 1, 1, :);

julia> C = transform(Chebyshev()  Chebyshev()  Chebyshev(), M);

julia> C  coefficients(x) .* coefficients(y)' .* reshape(coefficients(z), 1,1,:)
true

@codecov
Copy link

codecov bot commented Sep 27, 2022

Codecov Report

Base: 70.81% // Head: 70.65% // Decreases project coverage by -0.16% ⚠️

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

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #215      +/-   ##
==========================================
- Coverage   70.81%   70.65%   -0.17%     
==========================================
  Files          77       77              
  Lines        7971     8005      +34     
==========================================
+ Hits         5645     5656      +11     
- Misses       2326     2349      +23     
Impacted Files Coverage Δ
src/Multivariate/TensorSpace.jl 67.01% <47.61%> (-3.86%) ⬇️
src/Fun.jl 68.94% <100.00%> (ø)
src/Caching/ragged.jl 62.68% <0.00%> (-1.00%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

@jishnub jishnub merged commit abed5ff into JuliaApproximation:master Sep 27, 2022
@jishnub jishnub deleted the transformnd branch September 27, 2022 14:23
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

Successfully merging this pull request may close these issues.

1 participant