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
Trait Implementations
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$.
Auto Trait Implementations
impl<'a> RefUnwindSafe for BallInf<'a>
impl<'a> UnwindSafe for BallInf<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more