pub struct SOSDecomposition {
pub squares: Vec<Polynomial>,
pub gram_matrix: Vec<f64>,
pub basis: Vec<Monomial>,
}Expand description
SOS decomposition: p = Σ q_i²
Fields§
§squares: Vec<Polynomial>The squared polynomials q_i
gram_matrix: Vec<f64>Gram matrix Q such that p = v^T Q v where v is monomial basis
basis: Vec<Monomial>Monomial basis used
Implementations§
Source§impl SOSDecomposition
impl SOSDecomposition
Sourcepub fn verify(&self, original: &Polynomial, tol: f64) -> bool
pub fn verify(&self, original: &Polynomial, tol: f64) -> bool
Verify decomposition: check that Σ q_i² ≈ original polynomial
Sourcepub fn reconstruct(&self) -> Polynomial
pub fn reconstruct(&self) -> Polynomial
Reconstruct polynomial from decomposition
Sourcepub fn lower_bound(&self) -> f64
pub fn lower_bound(&self) -> f64
Get lower bound on polynomial (should be ≥ 0 if SOS)
Trait Implementations§
Source§impl Clone for SOSDecomposition
impl Clone for SOSDecomposition
Source§fn clone(&self) -> SOSDecomposition
fn clone(&self) -> SOSDecomposition
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for SOSDecomposition
impl RefUnwindSafe for SOSDecomposition
impl Send for SOSDecomposition
impl Sync for SOSDecomposition
impl Unpin for SOSDecomposition
impl UnwindSafe for SOSDecomposition
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