Struct optimization_engine::constraints::BallInf[][src]

pub struct BallInf<'a> { /* fields omitted */ }
Expand description

An infinity ball defined as $B_\infty^r = \{x\in\mathbb{R}^n {}:{} \Vert{}x{}\Vert_{\infty} \leq r\}$, where $\Vert{}\cdot{}\Vert_{\infty}$ is the infinity norm. The infinity ball centered at a point $x_c$ is defined as $B_\infty^{x_c,r} = \{x\in\mathbb{R}^n {}:{} \Vert{}x-x_c{}\Vert_{\infty} \leq r\}$.

Implementations

Construct a new infinity-norm ball with given center and radius If no center is given, then it is assumed to be in the origin

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Computes the projection of a given vector x on the current infinity ball.

The projection of a $v\in\mathbb{R}^{n}$ on $B_\infty^r$ is given by $\Pi_{B_\infty^r}(v) = z$ with

$$ z_i = \begin{cases}v_i,&\text{ if } |z_i| \leq r\\\mathrm{sng}(v_i)r,&\text{ otherwise}\end{cases} $$

for all $i=1,\ldots, n$, where sgn is the sign function.

The projection of $v\in\mathbb{R}^{n}$ on $B_\infty^{x_c,r}$ is given by $\Pi_{B_\infty^r}(v) = z$ with

$$ z_i = \begin{cases}v_i,&\text{ if } |z_i-x_{c, i}| \leq r\\x_{c,i} + \mathrm{sng}(v_i)r,&\text{ otherwise}\end{cases} $$

for all $i=1,\ldots, n$.

Returns true if and only if the set is convex

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.