Struct totsu_core::ConePSD
source · pub struct ConePSD<'a, L: LinAlgEx> { /* private fields */ }
Expand description
Positive semidefinite cone
\[ {\rm vec}(\mathcal{S}_+^k) = \left\lbrace x \in \mathbb{R}^n,\ n=\frac12 k(k+1) \ \middle|\ {\rm vec}^{-1}(x) \in \mathcal{S}_+^k \right\rbrace \] \( {\rm vec}(X) = (X_{11}\ \sqrt2 X_{12}\ X_{22}\ \sqrt2 X_{13}\ \sqrt2 X_{23}\ X_{33}\ \cdots)^T \) which extracts and scales the upper-triangular part of a symmetric matrix X in column-wise.
Implementations§
source§impl<'a, L: LinAlgEx> ConePSD<'a, L>
impl<'a, L: LinAlgEx> ConePSD<'a, L>
sourcepub fn query_worklen(nvars: usize) -> usize
pub fn query_worklen(nvars: usize) -> usize
Query of a length of work slice.
Returns the length of work slice that ConePSD::new
requires.
nvars
is a number of variables, that is a length ofx
ofConePSD::proj
.
sourcepub fn new(work: &'a mut [L::F], eps_zero: L::F) -> Self
pub fn new(work: &'a mut [L::F], eps_zero: L::F) -> Self
Creates an instance.
Returns the ConePSD
instance.
work
slice is used for temporal variables inConePSD::proj
.eps_zero
should be the same value ascrate::solver::SolverParam::eps_zero
.