pub struct Rectangle<'a> { /* private fields */ }
Expand description
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§
Source§impl<'a> Rectangle<'a>
impl<'a> Rectangle<'a>
Sourcepub fn new(xmin: Option<&'a [f64]>, xmax: Option<&'a [f64]>) -> Self
pub fn new(xmin: Option<&'a [f64]>, xmax: Option<&'a [f64]>) -> Self
Construct a new rectangle with given $x_{\min}$ and $x_{\max}$
§Arguments
xmin
: minimum value ofx
xmin
: maximum value ofx
§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
andxmax
areNone
(useNoConstraints
instead) - Both
xmin
andxmax
have been provided, but they have incompatible dimensions
Trait Implementations§
Source§impl<'a> Constraint for Rectangle<'a>
impl<'a> Constraint for Rectangle<'a>
impl<'a> Copy for Rectangle<'a>
Auto Trait Implementations§
impl<'a> Freeze for Rectangle<'a>
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§
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