[][src]Struct flag_algebra::sdp::Problem

pub struct Problem<N, F> {
    pub ineqs: Vec<Ineq<N, F>>,
    pub cs: Vec<MulAndUnlabel<F>>,
    pub obj: QFlag<N, F>,
}

The optimisation 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 inequlities to be used.

obj: QFlag<N, F>

Vector to be optimized.

Implementations

impl<N, F: Flag> Problem<N, F>[src]

pub fn check(&self)[src]

Panic if the size of the basis involved are inconsistent.

pub fn view<'a>(&'a self, selector: &'a Selector) -> ProblemView<'a, N, F>[src]

impl<N, F> Problem<N, F> where
    N: Display + Zero + Copy + PartialEq + Neg<Output = N>,
    F: Flag
[src]

pub fn write_sdpa(&self, filename: &str) -> Result<()>[src]

Write the semi-definite program in the file filename in the sdpa format.

pub fn no_scale(self) -> Self where
    N: DivAssign + ScalarOperand + FromPrimitive
[src]

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.

pub fn solve_csdp(&self, filename: &str) -> Result<f64, Error>[src]

Solve the sdp using the CSDP solver.

pub fn run_csdp(
    &self,
    name: &str,
    initial_solution: Option<&str>,
    minimize_certificate: bool
) -> Result<f64, Error>
[src]

Trait Implementations

impl<N: Clone, F: Clone> Clone for Problem<N, F>[src]

impl<N: Debug, F: Debug> Debug for Problem<N, F>[src]

Auto Trait Implementations

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> where
    F: Unpin,
    N: Unpin

impl<N, F> !UnwindSafe for Problem<N, F>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

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