[−][src]Module optimization_engine::lipschitz_estimator
Estimates a local Lipschitz constant for a mapping $F: \mathbb{R}^n \to \mathbb{R}^n$
Functions are provided as closures.
Method
This method computes a numerical approximation of the norm of the directional derivative of a function $F:\mathbb{R}^n \to \mathbb{R}^n$ at a point $u\in\mathbb{R}^n$ along a direction $h \in \mathbb{R}^n$ with $h_i = \max \{\delta, \epsilon u_i\}$, where $\delta$ and $\epsilon$ are given small numbers.
The estimated (local) Lipschitz constant is
$$ L_F(u) = \frac{\Vert{}F(u + h) - F(u){}\Vert}{\Vert{}h{}\Vert} $$
Example
use optimization_engine::{SolverError, lipschitz_estimator::LipschitzEstimator}; pub fn F(u: &[f64], g: &mut [f64]) -> Result<(), SolverError> { g[0] = 3.0 * u[0]; g[1] = 2.0 * u[1]; g[2] = 4.5; Ok(()) } let mut u: [f64; 3] = [1.0, 2.0, 3.0]; let mut function_value = [0.0; 3]; let mut lip_estimator = LipschitzEstimator::new(&mut u, &F, &mut function_value); let lip = lip_estimator.estimate_local_lipschitz();
Structs
LipschitzEstimator | Structure for the computation of estimates of the Lipschitz constant of mappings |