pub struct Bisection {
pub domain_size: u64,
pub budget: Budget,
pub lo: u64,
pub hi: u64,
pub threshold: u64,
}Expand description
Bounded monotone-boundary bisection carrier.
Fields§
§domain_size: u64Size of the ordered domain.
budget: BudgetBudget that counts admitted probes.
lo: u64Inclusive lower interval endpoint.
hi: u64Inclusive upper interval endpoint.
threshold: u64Monotone boundary retained inside the interval.
Implementations§
Source§impl Bisection
impl Bisection
Sourcepub fn new(
lo: u64,
hi: u64,
threshold: u64,
domain_size: u64,
max_probes: u64,
) -> Bisection
pub fn new( lo: u64, hi: u64, threshold: u64, domain_size: u64, max_probes: u64, ) -> Bisection
Init (TLA+ Init): a candidate interval straddling the threshold, no probes taken yet.
Sourcepub fn converged(&self) -> bool
pub fn converged(&self) -> bool
Whether the interval has been narrowed to a point (TLA+ Converged guard).
Auto Trait Implementations§
impl Freeze for Bisection
impl RefUnwindSafe for Bisection
impl Send for Bisection
impl Sync for Bisection
impl Unpin for Bisection
impl UnsafeUnpin for Bisection
impl UnwindSafe for Bisection
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