pub struct BestScoreFeasibleTermination<S, F>{ /* private fields */ }Expand description
Terminates when the best score becomes feasible.
A score is considered feasible when it meets a feasibility check defined by a user-provided function. For HardSoftScore, this typically means hard score >= 0 (no hard constraint violations).
§Zero-Erasure Design
The feasibility check function F is stored as a concrete generic type
parameter, eliminating virtual dispatch overhead when checking termination.
Implementations§
Source§impl<S, F> BestScoreFeasibleTermination<S, F>
impl<S, F> BestScoreFeasibleTermination<S, F>
Source§impl<S: PlanningSolution> BestScoreFeasibleTermination<S, fn(&S::Score) -> bool>
impl<S: PlanningSolution> BestScoreFeasibleTermination<S, fn(&S::Score) -> bool>
Sourcepub fn score_at_least_zero() -> Self
pub fn score_at_least_zero() -> Self
Creates a termination that checks if score >= zero.
This is the typical feasibility check for most score types.
Trait Implementations§
Source§impl<S, F> Debug for BestScoreFeasibleTermination<S, F>
impl<S, F> Debug for BestScoreFeasibleTermination<S, F>
Source§impl<S, F> Termination<S> for BestScoreFeasibleTermination<S, F>
impl<S, F> Termination<S> for BestScoreFeasibleTermination<S, F>
Source§fn is_terminated(&self, solver_scope: &SolverScope<S>) -> bool
fn is_terminated(&self, solver_scope: &SolverScope<S>) -> bool
Returns true if solving should terminate.
Auto Trait Implementations§
impl<S, F> Freeze for BestScoreFeasibleTermination<S, F>where
F: Freeze,
impl<S, F> RefUnwindSafe for BestScoreFeasibleTermination<S, F>where
F: RefUnwindSafe,
S: RefUnwindSafe,
impl<S, F> Send for BestScoreFeasibleTermination<S, F>
impl<S, F> Sync for BestScoreFeasibleTermination<S, F>
impl<S, F> Unpin for BestScoreFeasibleTermination<S, F>
impl<S, F> UnwindSafe for BestScoreFeasibleTermination<S, F>where
F: UnwindSafe,
S: UnwindSafe,
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