Struct LMIOracle

Source
pub struct LMIOracle { /* private fields */ }
Expand description

The LMIOracle struct represents an oracle for a Linear Matrix Inequality (LMI) constraint. It contains the necessary data to evaluate the LMI constraint, including the matrix mat_f, the matrix mat_f0, and an LDLTMgr instance for managing the Cholesky decomposition. This oracle can be used to check the feasibility of a given point with respect to the LMI constraint.

Implementations§

Source§

impl LMIOracle

Source

pub fn new(mat_f: Vec<Array2<f64>>, mat_b: Array2<f64>) -> Self

This function initializes a new LMIOracle struct with given matrices and an LDLTMgr instance.

Arguments:

  • mat_f: The mat_f parameter is a vector of 2D arrays of type f64.
  • mat_b: The mat_b parameter is an Array2<f64> type, which represents a 2-dimensional array of f64 (floating point numbers).

Returns:

An instance of the LMIOracle struct is being returned.

Trait Implementations§

Source§

impl OracleFeas<ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>> for LMIOracle

Source§

fn assess_feas(&mut self, xc: &Array1<f64>) -> Option<Cut>

The function assesses the feasibility of a solution by calculating the difference between elements of matrices based on input arrays.

Arguments:

  • mat_f0: mat_f0 is a reference to a 2D array of f64 values.
  • mat_f: The mat_f parameter in the get_elem function is a slice of Array2<f64> types. It represents an array of 2D matrices. Each element in the slice is a 2D matrix of f64 values.
  • xc: The xc parameter in the assess_feas function is a reference to an Array1<f64>, which represents a one-dimensional array of floating-point numbers. This array is used as input to the function for some calculations related to feasibility assessment.
Source§

type CutChoice = f64

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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

Source§

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.