pub enum PrimalStatus {
NoSolution,
FeasiblePoint,
OptimalPoint,
}Expand description
The status of the primal point held in a crate::SolverResult.
Decoupled from TerminationStatus so a result that stopped at a limit can
still carry a usable incumbent.
Variants§
NoSolution
No primal point is available.
FeasiblePoint
A feasible point is available, but not proven optimal.
OptimalPoint
A proven-optimal point is available.
Implementations§
Source§impl PrimalStatus
impl PrimalStatus
Sourcepub fn infer(termination: &TerminationStatus, has_point: bool) -> Self
pub fn infer(termination: &TerminationStatus, has_point: bool) -> Self
Classify the primal status from the termination reason and whether a
point was actually returned. Optimal termination with a point yields
PrimalStatus::OptimalPoint; any other termination with a point yields
PrimalStatus::FeasiblePoint; no point yields
PrimalStatus::NoSolution.
Sourcepub fn has_solution(self) -> bool
pub fn has_solution(self) -> bool
Whether a usable primal point is available.
Trait Implementations§
Source§impl Clone for PrimalStatus
impl Clone for PrimalStatus
Source§fn clone(&self) -> PrimalStatus
fn clone(&self) -> PrimalStatus
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PrimalStatus
Source§impl Debug for PrimalStatus
impl Debug for PrimalStatus
impl Eq for PrimalStatus
Source§impl PartialEq for PrimalStatus
impl PartialEq for PrimalStatus
Source§fn eq(&self, other: &PrimalStatus) -> bool
fn eq(&self, other: &PrimalStatus) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PrimalStatus
Auto Trait Implementations§
impl Freeze for PrimalStatus
impl RefUnwindSafe for PrimalStatus
impl Send for PrimalStatus
impl Sync for PrimalStatus
impl Unpin for PrimalStatus
impl UnsafeUnpin for PrimalStatus
impl UnwindSafe for PrimalStatus
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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