Skip to content
Snippets Groups Projects
Unverified Commit 64001961 authored by Nora Abi Akar's avatar Nora Abi Akar Committed by GitHub
Browse files

Bug fix: shared state time vector swap (#1253)

Fixes a bug caused by swapping the `time` and `time_to` vectors in the `shared_state` and not swapping the corresponding data pointers in the `threshold_watcher` and `mechanism`.
- This fix keeps the swapping optimization, and instead, the `threshold_watcher` and `mechanism` hold pointers to the std::vectors (not the underlying arrays) which are dereferenced before use. 
- The mechanism API functions have been renamed. 
- A unit test is also added that checks the interpolation behavior of the `threshold_watcher`.

Fixes #1251 
parent 2778aa48
No related branches found
No related tags found
No related merge requests found
Showing
with 159 additions and 61 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment