Skip to main content

ConvexSubdifferential

Struct ConvexSubdifferential 

Source
pub struct ConvexSubdifferential {
    pub name: String,
    pub is_differentiable: bool,
    pub strong_convexity_modulus: f64,
    pub is_lipschitz: bool,
    pub lipschitz_constant: f64,
}
Expand description

Represents a convex function via its subdifferential properties.

Fields§

§name: String

Name/description of the function.

§is_differentiable: bool

Whether the function is differentiable.

§strong_convexity_modulus: f64

Whether the function is strongly convex with modulus μ > 0.

§is_lipschitz: bool

Whether the function is Lipschitz continuous.

§lipschitz_constant: f64

Lipschitz constant L (if is_lipschitz).

Implementations§

Source§

impl ConvexSubdifferential

Source

pub fn new(name: &str) -> Self

Create a new subdifferential descriptor.

Source

pub fn with_differentiability(self) -> Self

Set differentiability.

Source

pub fn with_strong_convexity(self, mu: f64) -> Self

Set strong convexity modulus μ.

Source

pub fn with_lipschitz(self, l: f64) -> Self

Set Lipschitz constant.

Source

pub fn sum_rule_holds(&self, other: &ConvexSubdifferential) -> bool

Subdifferential sum rule: ∂(f + g)(x) ⊇ ∂f(x) + ∂g(x). Equality holds when regularity condition is satisfied.

Source

pub fn chain_rule_holds(&self) -> bool

Chain rule: ∂(f ∘ A)(x) = A^T ∂f(Ax) under constraint qualification.

Source

pub fn gradient_descent_rate(&self) -> Option<f64>

Fenchel conjugate: optimal convergence rate for gradient descent. With μ-strong convexity and L-smoothness: rate = 1 - μ/L.

Source

pub fn proximal_convergence_rate(&self, k: usize) -> f64

Proximal point algorithm convergence: 1/k rate for convex, linear for strongly convex.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.