pub enum SolverValue {
WinIn(u32),
LossIn(u32),
Draw,
Unknown,
}Variants§
Implementations§
Source§impl SolverValue
impl SolverValue
pub fn to_i32(self) -> i32
pub fn to_outcome_wdl(self) -> Option<OutcomeWDL>
Sourcepub fn merge(old: SolverValue, new: SolverValue) -> (SolverValue, Ordering)
pub fn merge(old: SolverValue, new: SolverValue) -> (SolverValue, Ordering)
Return (best_value, cmp(new, old)),
where best_value properly accounts for shortest win, longest loss and draw vs unknown.
Sourcepub fn could_be_optimal_child(parent: SolverValue, child: SolverValue) -> bool
pub fn could_be_optimal_child(parent: SolverValue, child: SolverValue) -> bool
Return whether child could a child of the optimally combined parent.
Trait Implementations§
Source§impl Clone for SolverValue
impl Clone for SolverValue
Source§fn clone(&self) -> SolverValue
fn clone(&self) -> SolverValue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SolverValue
impl Debug for SolverValue
Source§impl Neg for SolverValue
impl Neg for SolverValue
Source§impl PartialEq for SolverValue
impl PartialEq for SolverValue
impl Copy for SolverValue
impl Eq for SolverValue
impl StructuralPartialEq for SolverValue
Auto Trait Implementations§
impl Freeze for SolverValue
impl RefUnwindSafe for SolverValue
impl Send for SolverValue
impl Sync for SolverValue
impl Unpin for SolverValue
impl UnwindSafe for SolverValue
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