6 releases
0.1.5 | Jan 1, 2025 |
---|---|
0.1.4 | Dec 31, 2024 |
0.1.1 | Nov 25, 2024 |
#930 in Rust patterns
524 downloads per month
315KB
5K
SLoC
numdiff
Automatic and numerical differentiation.
Documentation
Please see https://docs.rs/numdiff.
Overview
This crate implements two different methods for evaluating derivatives in Rust:
- Automatic differentiation (forward-mode using first-order dual numbers).
- Numerical differentiation (using forward difference and central difference approximations).
This crate provides generic functions (for numerical differentiation) and macros (for automatic differentiation) to evaluate various types of derivatives of the following types of functions:
- Univariate, scalar-valued functions (
f: ℝ → ℝ
) - Univariate, vector-valued functions (
f: ℝ → ℝᵐ
) - Multivariate, scalar-valued functions (
f: ℝⁿ → ℝ
) - Multivariate, vector-valued functions (
f: ℝⁿ → ℝᵐ
)
These functions and macros are made generic over the choice of vector representation, as long as the vector type implements the linalg_traits::Vector
trait. See the linalg_traits
documentation for more information.
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Dependencies
~190–285KB