-
Notifications
You must be signed in to change notification settings - Fork 3
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
Recursive interpolation #102
Open
BrendanKKrueger
wants to merge
23
commits into
main
Choose a base branch
from
bkk_interpToReal
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
a095651
Fix a minor type error and add a const version.
BrendanKKrueger f51c410
First draft of recursive implementation.
BrendanKKrueger 8ac909c
I was querying the grids in the wrong order, so my indices and weight…
BrendanKKrueger 1cf992c
format
BrendanKKrueger 45156e1
Rename for now.
BrendanKKrueger ff9a916
Added a customization point where the argument _could_ be a different…
BrendanKKrueger 5b7e13b
More generalizing.
BrendanKKrueger 74cdfbc
Rearrange.
BrendanKKrueger 4d5ceef
Change how the arguments are iterated over to populate the indexweigh…
BrendanKKrueger f093ae4
Add int
BrendanKKrueger b21e940
number template is now redundant
BrendanKKrueger c885dcf
Use interpolate_alt for remaining interpToReal.
BrendanKKrueger 2acc1fe
A little cleanup
BrendanKKrueger fc2462a
Cleanup
BrendanKKrueger f881e5b
format
BrendanKKrueger 94a0014
consistency
BrendanKKrueger 939e602
Better handling of passing the indices to the dataView_ lookup (plus …
BrendanKKrueger 52192b6
Replace separate index and weights_t with combined index_and_weights_t.
BrendanKKrueger 4d997b5
a bit of clarifying comments
BrendanKKrueger 1f53801
Streamline iwlist iteration.
BrendanKKrueger 55197b2
Minor tweaks
BrendanKKrueger 99cf011
Delete TODO comment.
BrendanKKrueger 7b22602
Rename "interpolate" to "interpToScalar", and add a note about the fu…
BrendanKKrueger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inverting the order here is a little frightening... we might want some kind of (debug enabled) sanity check that the grid array is the same size as the arg list when we call this for the first time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, something has to be inverted:
grids_
is reversed relative to the order of the argumentsappend_index_and_weights
method could recurse in the opposite order as the interpolation, which would mean that the loop over grids wouldn't be backwards. But then either we're fillingiwlist
back to front or we're readingiwlist
back to front during the interpolation recursion.I was assuming that
assert(canInterpToReal_(N));
would do the kind of sanity checking that you're looking for. If not, what sort of check(s) would you consider sufficient here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly related: When filling
iwlist
, I skip axes where the argument is already an index, because we don't need to store another copy of the same index and the weights are implicitly 1 and 0, soiwlist
is redundant for those axes. However, because I declareiwlist
as having lengthN
, the memory is already allocated. After thinking about it, I think that this is just one extra thing to remember and we're better off just usingiwlist
consistently regardless of whether the argument is an index or a coordinate. This may be relevant if we change howiwlist
is filled (e.g., if we fill it back-to-front). So I'm changing that behavior to just always useiwlist
consistently.