CIL
CIL copied to clipboard
Added __neg__ to function class
Description
Adds a __neg__ function in the Function class. e.g. we can now write f = - SVRGFunction(fi) f instead of f = -1*SVRGFunction(fi).
We already have this for Operators and DataContainers.
Related issues/links
Closes #1806
Checklist
- [x] I have performed a self-review of my code
- [x] I have added docstrings in line with the guidance in the developer guide
- [x] I have updated the relevant documentation
- [x] I have implemented unit tests that cover any new or modified functionality
- [ ] CHANGELOG.md has been updated with any functionality change
- [x] Request review from all relevant developers
- [x] Change pull request label to 'Waiting for review'
Contribution Notes
Please read and adhere to the developer guide and local patterns and conventions.
- [x] The content of this Pull Request (the Contribution) is intentionally submitted for inclusion in CIL (the Work) under the terms and conditions of the Apache-2.0 License
- [x] I confirm that the contribution does not violate any intellectual property rights of third parties