opensim-core
opensim-core copied to clipboard
Add setters to `DataTable.h` to make setting columns scripting-friendly
Brief summary of changes
This PR introduces the methods setDependentColumnAtIndex
and setDependentColumn
(two signatures each) for setting dependent columns in DataTable
s. These are more scripting-friendly, whereas the upd
-based methods fail.
Testing I've completed
Added tests to testDataTable.cpp
.
Looking for feedback on...
These methods are needed because interacting with the VectorView
object doesn't work in scripting. I could see the argument for fixing this issue directly, but this update is probably more straight-forward and these methods generally useful.
CHANGELOG.md (choose one)
- updated.
@nickbianco Can we include a call to this method in a python and/or java testcase since this is intended to help scripting? Also to see if a more general solution could be worked out. Thank you
@aymanhab I'll update the testing soon to include a scripting test case.
After some quick testing, I've realized that the upd
-based methods do work as intended in Python. Will check to confirm the same behavior in Matlab, and if so, will close the PR.
upd
methods work in Matlab as well. Closing this PR.