pub struct Problem<N, F: Flag> {
pub ineqs: Vec<Ineq<N, F>>,
pub cs: Vec<MulAndUnlabel<F>>,
pub obj: QFlag<N, F>,
}Expand description
The optimization problems over flags are translated into a sdp problem in the sdpa format.
Shape of the matrices:
For each i in ineqs (where i is itself a vector of inequalities): A diagonal block of size i.len()
For each cs:
A block with the size od cs.input_matrix
An optimization problem expressed in flags algebra.
Fields§
§ineqs: Vec<Ineq<N, F>>Set of contraint inequalities.
cs: Vec<MulAndUnlabel<F>>Set of Cauchy-Schwarz inequalities to be used.
obj: QFlag<N, F>Vector to be optimized.
Implementations§
Source§impl<N, F> Problem<N, F>
impl<N, F> Problem<N, F>
Sourcepub fn write_sdpa(&self, filename: &str) -> Result<()>
pub fn write_sdpa(&self, filename: &str) -> Result<()>
Write the semi-definite program in the file filename in the sdpa format.
Sourcepub fn no_scale(self) -> Self
pub fn no_scale(self) -> Self
Rescale the objective according to its scale field. If this method is not used, the output of the sdp solver may need to be rescaled.
Sourcepub fn solve_csdp(&self, filename: &str) -> Result<f64, Error>
pub fn solve_csdp(&self, filename: &str) -> Result<f64, Error>
Solve the sdp using the CSDP solver.
pub fn run_csdp( &self, name: &str, initial_solution: Option<&str>, minimize_certificate: bool, ) -> Result<f64, Error>
Trait Implementations§
Auto Trait Implementations§
impl<N, F> Freeze for Problem<N, F>
impl<N, F> !RefUnwindSafe for Problem<N, F>
impl<N, F> !Send for Problem<N, F>
impl<N, F> !Sync for Problem<N, F>
impl<N, F> Unpin for Problem<N, F>
impl<N, F> !UnwindSafe for Problem<N, F>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.