2. API Reference
The specular package consists of the following modules and subpackages.
2.1. Calculation
specular.calculation: five primary functions to calculate specular differentiation, depending on the dimension of input.
2.2. ODE
-
specular.ode.solver: the specular Euler, specular trigonometric, and specular Heun schemes. -
specular.ode.classical_solver: the explicit Euler, implicit Euler, and Crank-Nicolson schemes. -
specular.ode.result: theODEResultclass to store the results.
2.3. Optimization
-
specular.optimization.step_size: theStepSizeclass to define step size \(h_k\). -
specular.optimization.solver: the specular gradient method. -
specular.optimization.classical_solver: the gradient descent method, Adam, and BFGS. Lazy importing. -
specular.optimization.result: theOptimizationResultclass to store the results.
2.4. Backend
-
specular.backend: backend state management and backend selection throughspecular.change_backend(...). -
specular.calculation: routes calculation calls to the current backend. -
specular.optimization.solver: routes optimization calls to the current backend.