pub struct EpigraphSquaredNorm {}
Expand description
The epigraph of the squared Eucliden norm is a set of the form $X = \{x = (z, t) \in \mathbb{R}^{n}\times \mathbb{R} {}:{} \|z\|^2 \leq t \}.$
Implementations§
Trait Implementations§
source§impl Clone for EpigraphSquaredNorm
impl Clone for EpigraphSquaredNorm
source§fn clone(&self) -> EpigraphSquaredNorm
fn clone(&self) -> EpigraphSquaredNorm
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Constraint for EpigraphSquaredNorm
impl Constraint for EpigraphSquaredNorm
source§fn project(&self, x: &mut [f64])
fn project(&self, x: &mut [f64])
Project on the epigraph of the squared Euclidean norm.
The projection is computed as detailed here.
§Arguments
x
: The given vector $x$ is updated with the projection on the set
§Example
use optimization_engine::constraints::*;
let epi = EpigraphSquaredNorm::new();
let mut x = [1., 2., 3., 4.];
epi.project(&mut x);
source§impl Default for EpigraphSquaredNorm
impl Default for EpigraphSquaredNorm
source§fn default() -> EpigraphSquaredNorm
fn default() -> EpigraphSquaredNorm
Returns the “default value” for a type. Read more
impl Copy for EpigraphSquaredNorm
Auto Trait Implementations§
impl Freeze for EpigraphSquaredNorm
impl RefUnwindSafe for EpigraphSquaredNorm
impl Send for EpigraphSquaredNorm
impl Sync for EpigraphSquaredNorm
impl Unpin for EpigraphSquaredNorm
impl UnwindSafe for EpigraphSquaredNorm
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