[][src]Struct optimization_engine::constraints::Rectangle

pub struct Rectangle<'a> { /* fields omitted */ }

A rectangle, $R = \{x \in \mathbb{R}^n {}:{} x_{\min} {}\leq{} x {}\leq{} x_{\max}\}$

A set of the form $\{x \in \mathbb{R}^n {}:{} x_{\min} {}\leq{} x {}\leq{} x_{\max}\}$, where $\leq$ is meant in the element-wise sense and either of $x_{\min}$ and $x_{\max}$ can be equal to infinity.

Implementations

impl<'a> Rectangle<'a>[src]

pub fn new(xmin: Option<&'a [f64]>, xmax: Option<&'a [f64]>) -> Rectangle<'a>[src]

Construct a new rectangle with given $x_{\min}$ and $x_{\max}$

Arguments

  • xmin: minimum value of x
  • xmin: maximum value of x

Note

Rectangle does not copy xmin and xmax internally; it only keeps a reference. You may set one of xmin and xmax to None (but not both).

Panics

The method panics if:

  • Both xmin and xmax are None (use NoConstraints instead)
  • Both xmin and xmax have been provided, but they have incompatible dimensions

Trait Implementations

impl<'a> Clone for Rectangle<'a>[src]

impl<'a> Constraint for Rectangle<'a>[src]

impl<'a> Copy for Rectangle<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Rectangle<'a>

impl<'a> Send for Rectangle<'a>

impl<'a> Sync for Rectangle<'a>

impl<'a> Unpin for Rectangle<'a>

impl<'a> UnwindSafe for Rectangle<'a>

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