pub struct ProximalPointSolver {
pub lambda: f64,
pub max_iter: usize,
pub tol: f64,
}Expand description
Proximal point algorithm solver for minimising a proper lower-semicontinuous function.
Fields§
§lambda: f64Regularisation parameter λ > 0.
max_iter: usizeMaximum number of iterations.
tol: f64Convergence tolerance.
Implementations§
Source§impl ProximalPointSolver
impl ProximalPointSolver
Sourcepub fn prox_step(&self, f: impl Fn(&[f64]) -> f64 + Copy, v: &[f64]) -> Vec<f64>
pub fn prox_step(&self, f: impl Fn(&[f64]) -> f64 + Copy, v: &[f64]) -> Vec<f64>
Approximate the proximal operator prox_{λf}(v) via gradient descent on f(x) + ‖x-v‖²/(2λ).
Sourcepub fn solve(
&self,
f: impl Fn(&[f64]) -> f64 + Copy,
x0: &[f64],
) -> Vec<Vec<f64>>
pub fn solve( &self, f: impl Fn(&[f64]) -> f64 + Copy, x0: &[f64], ) -> Vec<Vec<f64>>
Run the proximal point algorithm starting from x0. Returns the sequence of iterates.
Sourcepub fn has_converged(&self, iterates: &[Vec<f64>]) -> bool
pub fn has_converged(&self, iterates: &[Vec<f64>]) -> bool
Check convergence: last step size is smaller than tolerance.
Auto Trait Implementations§
impl Freeze for ProximalPointSolver
impl RefUnwindSafe for ProximalPointSolver
impl Send for ProximalPointSolver
impl Sync for ProximalPointSolver
impl Unpin for ProximalPointSolver
impl UnsafeUnpin for ProximalPointSolver
impl UnwindSafe for ProximalPointSolver
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more