pub struct SecondOrderCone { /* private fields */ }
Expand description

A second-order cone (SOC)

A set of the form

$$ C_{\alpha} = \{x=(y, t) \in \mathbb{R}^{n+1}: t\in\mathbb{R}, \Vert{}y\Vert \leq \alpha{}t\}, $$

where $\alpha$ is a positive scalar.

Projections on the second-order cone are computed as in H.H. Bauschke’s 1996 doctoral dissertation: Projection Algorithms and Monotone Operators (p. 40, Theorem 3.3.6).

Implementations§

source§

impl SecondOrderCone

source

pub fn new(alpha: f64) -> SecondOrderCone

Construct a new instance of SecondOrderCone with parameter alpha

A second-order cone with parameter alpha is the set $C_\alpha = \{x=(y, t) \in \mathbb{R}^{n+1}: t\in\mathbb{R}, \Vert{}y\Vert \leq \alpha t\}$, where $\alpha$ is a positive parameter, and projections are computed according to Theorem 3.3.6 in H.H. Bauschke’s 1996 doctoral dissertation: Projection Algorithms and Monotone Operators (page 40).

§Arguments
  • alpha: parameter $\alpha$
§Panics

The method panics if the given parameter alpha is nonpositive.

Trait Implementations§

source§

impl Clone for SecondOrderCone

source§

fn clone(&self) -> SecondOrderCone

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Constraint for SecondOrderCone

source§

fn project(&self, x: &mut [f64])

Project on the second-order cone (updates the given vector/slice)

§Arguments
  • x: (in) vector to be projected on the current instance of a second-order cone, (out) projection on the second-order cone
§Panics

The methods panics is the length of x is less than 2.

source§

fn is_convex(&self) -> bool

Returns true if and only if the set is convex
source§

impl Copy for SecondOrderCone

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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

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

§

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>,

§

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.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V