Function interpolation using Fourier and Chebyshev methods#49
Open
ryboselm wants to merge 27 commits intoJoeyT1994:mainfrom
Open
Function interpolation using Fourier and Chebyshev methods#49ryboselm wants to merge 27 commits intoJoeyT1994:mainfrom
ryboselm wants to merge 27 commits intoJoeyT1994:mainfrom
Conversation
* Add support for rng and eltype in rand_itn * Bump ITN version * added error catching for gridpoints and function for random gridpoint sampling * change to overload Random.rand * Rename to prevent dimension overload * Rename calculate_fx(yz) to evaluate * Rename calculate_x(yz) to calculate_p * Rename delta_x(yz) to delta_p * created improved grid_points() * grid_points can take arbitrary ranges * Return dimension_indices * Changed instances of dimension in grid_points() and rand() to use d instead * updated grid_points() and rand() to incorporate feedback * grid_points() uses simpler method when span is default * changed to rand_p() and added enforced points * fix minor edge case * Formatting --------- Co-authored-by: Ryan Levy <rlevy@flatironinstitute.org> Co-authored-by: Joseph Tindall <51231103+JoeyT1994@users.noreply.github.com>
Add RNG passing
* Add support for rng and eltype in rand_itn * Bump ITN version * Rename to prevent dimension overload * Rename calculate_fx(yz) to evaluate * Rename calculate_x(yz) to calculate_p * Rename delta_x(yz) to delta_p * Return dimension_indices * add 1d polynomial interpolation * added black box function ITNs for fourier/chebyshev * working chebyshev * experimenting with function_itn * add data_itensornetwork() * started 2D functions, expanded data into QTT * working 2D function TNs * 2D data to ITN * clean up code * rename examples and add image to ITN example * function/data itn now takes top coefficients by magnitude by default * formatting * add data_itn documentation * move interpolation functions to new file * add compat version info --------- Co-authored-by: Ryan Levy <rlevy@flatironinstitute.org> Co-authored-by: Joseph Tindall <51231103+JoeyT1994@users.noreply.github.com>
* added clenshaw interpolation * update how max_coeffs works * add attribution and rename vars
ryanlevy
requested changes
Nov 1, 2024
Collaborator
ryanlevy
left a comment
There was a problem hiding this comment.
Thanks Ryan! Some suggestions
- It seems your grid_points improvements are not included here (and random point stuff?), so your
exact_grid=falsekwarg will fail. Could we add those? - Could you add some tests for these functions?
- I think all the
const_itnneed to include thedimthey are operating on (we probably should be able to interpolate on dim 1 of a 4 dim object etc) - I think we should make
fourier_2D_itensornetworkdisbatch off of thecoeffs, same withchebyshev_2D. We can also set it up such thatdimstells us what dim to add everything too (similar to above becausescould be bigger than the dimension of the FT)
I'm also not the biggest fan of the data_itensornetwork name function_itensornetwork names personally...
ryanlevy
reviewed
Nov 5, 2024
Owner
|
Thanks @ryboselm ! This PR is quite long for me to review all at once. As it introduces multiple separate things to the library I think we should split it up into several different PRs. Can you create two PRs. One for the grid point changes and one for the interpolation code? That will make it easier to review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ITNA Function Interpolation related changes made during the summer.
Note: this PR formerly had grid_points and rand_p related changes. These changes are now in PR #50.