You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 ofS
,F
, andC
by updating the basis matrix in place. OtherBasis
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.
The text was updated successfully, but these errors were encountered: