pub enum StoppingRule {
FixedProbes {
n_probes: u32,
},
BoundBased {
min_probes: u32,
max_probes: u32,
},
ProbabilisticBound {
probability_threshold: f32,
error_quantile: f32,
min_probes: u32,
max_probes: u32,
},
DeterministicBound {
max_error: f32,
},
BudgetConstrained {
inner: Box<StoppingRule>,
max_ram_bytes: u64,
max_latency: Duration,
},
}Expand description
Stopping rule that matches guarantee mode semantics
Variants§
FixedProbes
Stop after scanning fixed number of lists/probes
BoundBased
Stop when kth best score exceeds best list bound
For approximate mode: compare proxy scores directly
Fields
ProbabilisticBound
Stop when probability of finding better candidates drops below threshold
For calibrated mode: uses error envelopes to estimate probability
Fields
DeterministicBound
Stop when all candidates with possible better true scores are checked
For certified mode: uses deterministic LB/UB comparisons
BudgetConstrained
Combined budget and bound stopping
Implementations§
Source§impl StoppingRule
impl StoppingRule
Sourcepub fn for_mode(mode: &GuaranteeMode, default_probes: u32) -> Self
pub fn for_mode(mode: &GuaranteeMode, default_probes: u32) -> Self
Create stopping rule appropriate for guarantee mode
Sourcepub fn with_budget(self, max_ram_bytes: u64, max_latency: Duration) -> Self
pub fn with_budget(self, max_ram_bytes: u64, max_latency: Duration) -> Self
Wrap with budget constraints
Trait Implementations§
Source§impl Clone for StoppingRule
impl Clone for StoppingRule
Source§fn clone(&self) -> StoppingRule
fn clone(&self) -> StoppingRule
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 moreAuto Trait Implementations§
impl Freeze for StoppingRule
impl RefUnwindSafe for StoppingRule
impl Send for StoppingRule
impl Sync for StoppingRule
impl Unpin for StoppingRule
impl UnsafeUnpin for StoppingRule
impl UnwindSafe for StoppingRule
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
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