Skip to content
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

In-Place Basis Matrix and funeval #60

Open
chenwilliam77 opened this issue Nov 29, 2020 · 0 comments
Open

In-Place Basis Matrix and funeval #60

chenwilliam77 opened this issue Nov 29, 2020 · 0 comments

Comments

@chenwilliam77
Copy link

I could be wrong, but my impression is that, aside from complete_polynomials!, there is no way to update a basis matrix in place (i.e. the matrix of basis functions evaluated at specific nodes). All other methods recreate the basis matrix from scratch. In general, this is fine, but in the special case where you are just interpolating the same number of grid points in every dimension, this results in extra allocations because you could have just worked directly in-place. The notebook for solving an NK model globally in Julia is able to avoid this problem when interpolating for the future values of S, F, and C by updating the basis matrix in place. Other Basis types don't appear to have such functionality.

Please let me know if I've overlooked parts of the code! I'm still relatively new to the package.

If not, then I'm happy to work on it. The refactoring should be relatively mild.

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

No branches or pull requests

1 participant