This crate allows you to use Newton's method for rootfinding.
It aims to implement several Newton based methods (Broyden, ...), whether the jacobian function is provided or not.
It also aims to work on a complex model, limiting the number of model calls to a minimum.
A minimal solver is also provided for basic usages and benchmarking purposes.
A minimal solver is provided for basic usages in the solver_minimal
module.
Don't hesitate to check in this module documentation for examples.
This minimal solver works only on basic 1D functions.
The speed of the advanced solver will be benchmarked against this one to estimate the overhead.
An advanced solver is available for n-dimension problems.
To get improved interactions with the user problem (usually a function),
the user is required to implement the Model
trait in order to use the solver.
This ensures a reduced number of calls to the function and a better debugging experience if needed.
It is defined in the solver
module.
Don't hesitate to check in this module documentation for examples.
The focus of this crate is the development of this solver.
Model
trait.
The struct UserModelWithFunc
is provided to easily adapt a given function to the required trait.Real world use cases and an extensive function database are included in the crate for integration testing and benchmarking. (work in progress)
nalgebra
vectors.Note: Crates may have evolved since this comparison was established.
| crate | version | 1-dimension | n-dimension | Jacobian not required | Other algorithms¹ | |-----------------------|--------:|:------------:|:-----------:|----------------------:|------------------:| | newton_rootfinder | 0.1.0 | ✔️ | ✔️ | ✔️ | ❌ (not yet) | | newton-raphson | 0.1.0 | ✔️ | ❌ | ❌ | ❌ | | nrfind | 1.0.3 | ✔️ | ❌ | ❌ | ❌ | | rootfind | 0.7.0 | ✔️ | ❌ | ❌ | ✔️ | | roots | 0.6.0 | ✔️ | ❌ | ❌ | ✔️ | | peroxide | 0.21.7 | ✔️ | ✔️ | ❌ | ❌ |