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.
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
Multivariate functions #185
Multivariate functions #185
Changes from 7 commits
9199067
4e6a8ab
00c8118
bb0f8f6
2758897
568c3f5
00d75e3
a821c96
9263003
03e123a
2f23248
775ace3
64c9b54
2d61874
2cfe115
e9a0032
236eab4
98eaa53
c9430a8
f25efa7
2033c82
effb5a4
582c232
5adac34
d08dcb8
dd3cb6b
d7313fc
e1fb701
6640875
656a717
36d9411
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Is this necessary? Or could we define a function
productfun
that can choose to return an appropriate type? It'll be good if the constructor of a struct retains its type.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.
Currently multivariate functions are designed in a way to first build a tensor out of the coefficients and then first solve the first dimension followed by the second.
ProductFun
is designed for that, storing a vector of functions.I first implemented it that way, but this needs too much memory for high dimensional cases and threw errors for me for dimensions larger about 80 and 10000 coefficients (~1 million coefficients are possible in the 1D case for me). Therefore, I never build this tensor and don't use the vector of functions
ProductFun
is using. I think the approach is not compatible with the currentProductFun
.I think the best way would actually be to change the order of how the coefficients are vectorized, see #86 , because this change in coefficients is computationally costly (functions
fromtensor
andtotensor
build the "real" tensor out of the current way the coefficients are stored. I introducedtotensoriterator
for evaluating d>2 dimensional functions to avoid building the full tensor).However, this change could be breaking with current code using ApproxFun