Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor derivative operator creation with factory function
This commit introduces a new factory function `Derivative` to the `derivatives` module. This function streamlines the creation of derivative operators by allowing users to specify the type of derivative operator they wish to create using a string identifier. The supported types are "center", "simple", "forward", "backward", "b-spline", and "ph", which correspond to the ABGVOperator with specific parameters and the BSOperator and PHOperator with a specified order. The factory function returns a unique pointer to the created derivative operator, ensuring proper memory management and simplifying the Python interface. Additionally, this commit removes the direct exposure of the specific derivative operator classes to the Python interface, encouraging the use of the new factory function for creating derivative operators.
- Loading branch information