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
The interface refactor PR introduces fromRVector() and toRVector() methods for RealVector. These methods simplify usage by being more concise than the previous approach, which required calling resize(), purrr::walk(), and set() to assign values. It would be beneficial to implement these methods consistently in ParameterVector as well. Once that's done, we can update the tests to use fromRVector().
Keep all members in a shared pointer allowing copies to be made when an
object goes out of scope. These changes are needed to allow finalize()
to work and not crash the R session. RealVector was created as a part
of this work. ParameterVector are now set using resize() and purrr::walk()
rather than new().
TODO:
* Some additional thought shouldd go into using fromRVector and toRVector
in future versions of this code. See #766
* Update zzz.R to set methods for RealVector that handle indexing
translation (e.g., R uses 1-based indexing, C++ uses 0-based indexing).
* Modify the relevant R code that assigns values to RealVector to
accommodate the updated indexing.
Keep all members in a shared pointer allowing copies to be made when an
object goes out of scope. These changes are needed to allow finalize()
to work and not crash the R session. RealVector was created as a part
of this work. ParameterVector are now set using resize() and purrr::walk()
rather than new().
TODO:
* Some additional thought shouldd go into using fromRVector and toRVector
in future versions of this code. See #766
* Update zzz.R to set methods for RealVector that handle indexing
translation (e.g., R uses 1-based indexing, C++ uses 0-based indexing).
* Modify the relevant R code that assigns values to RealVector to
accommodate the updated indexing.
The interface refactor PR introduces fromRVector() and toRVector() methods for RealVector. These methods simplify usage by being more concise than the previous approach, which required calling resize(), purrr::walk(), and set() to assign values. It would be beneficial to implement these methods consistently in ParameterVector as well. Once that's done, we can update the tests to use fromRVector().
Originally posted by @Bai-Li-NOAA in #765 (comment)
The text was updated successfully, but these errors were encountered: