#[non_exhaustive]pub struct Clip {
pub pos: Vec<Vec<Q>>,
pub neg: Vec<Vec<Q>>,
pub on: Vec<Vec<Q>>,
/* private fields */
}Expand description
The result of Polytope::clip: the vertex sets of the two closed
pieces of a polytope cut by a hyperplane, in no particular order.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.pos: Vec<Vec<Q>>Vertices of P ∩ {h ≥ 0}.
neg: Vec<Vec<Q>>Vertices of P ∩ {h ≤ 0}.
on: Vec<Vec<Q>>Vertices on the hyperplane h = 0 — the edge crossings and the
original vertices with h = 0 — which belong to both pieces.
Implementations§
Source§impl Clip
impl Clip
Sourcepub fn pos_is_full_dimensional(&self) -> bool
pub fn pos_is_full_dimensional(&self) -> bool
Does P ∩ {h ≥ 0} have dimension n? One exact rank on the
vertex set, no LP; exact for a bounded parent (see
Polytope::is_full_dimensional_from_vertices).
Sourcepub fn neg_is_full_dimensional(&self) -> bool
pub fn neg_is_full_dimensional(&self) -> bool
Does P ∩ {h ≤ 0} have dimension n? As
pos_is_full_dimensional.
Sourcepub fn pos_polytope(
&self,
parent: &Polytope,
h: &HalfSpace,
) -> Result<Polytope, SymplexError>
pub fn pos_polytope( &self, parent: &Polytope, h: &HalfSpace, ) -> Result<Polytope, SymplexError>
The piece P ∩ {h ≥ 0} as a polytope (parent with h appended)
whose vertex cache is already filled from the clip, so a following
volume, vertices or
clip does no enumeration. parent and h must
be the polytope and half-space the clip was taken from; only their
shapes can be checked here.
§Errors
SymplexError::InvalidArgument if parent or h does not have
the shape of the clip’s inputs (dimension, number of half-spaces,
number of vertices).
Sourcepub fn neg_polytope(
&self,
parent: &Polytope,
h: &HalfSpace,
) -> Result<Polytope, SymplexError>
pub fn neg_polytope( &self, parent: &Polytope, h: &HalfSpace, ) -> Result<Polytope, SymplexError>
The piece P ∩ {h ≤ 0} as a polytope (parent with the flipped
half-space appended), with its vertex cache filled; otherwise as
pos_polytope.
§Errors
As pos_polytope.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Clip
impl RefUnwindSafe for Clip
impl Send for Clip
impl Sync for Clip
impl Unpin for Clip
impl UnsafeUnpin for Clip
impl UnwindSafe for Clip
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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 more