Add new overload for reweight action that tracks likelihood
Proposed changes
Closes #524. Changes include a new overload for the reweight action, tracking likelihood as well and storing it in the particle structure if there is a member for it.
Type of change
- [ ] 🐛 Bugfix (change which fixes an issue)
- [x] 🚀 Feature (change which adds functionality)
- [ ] 📚 Documentation (change which fixes or extends documentation)
Checklist
Put an x in the boxes that apply. This is simply a reminder of what we will require before merging your code.
- [x] Lint and unit tests (if any) pass locally with my changes
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] I have added necessary documentation (if appropriate)
- [x] All commits have been signed for DCO
Additional comments
Anything worth mentioning to the reviewers.
I am open to discussions about implementation, because @hidmic had the idea of using a view for the likelihood for example, but I wasn't so sure about that (that would mean to create the view before calling the action and passing it as argument, wouldn't it?).
Also, while researching about C++20 features for this, I found the 'concepts' feature, and I think that would be a good refactor for the templates restrictions.
Also, while researching about C++20 features for this, I found the 'concepts' feature, and I think that would be a good refactor for the templates restrictions.
When and if we switch to C++20, yes.