pub struct Budget {
pub max_steps: u64,
pub max_cells: usize,
}Expand description
Explicit compute and memory limits for one algorithm invocation.
Every algorithm in this crate takes a budget. When a limit would be exceeded the algorithm
stops and returns Error::BudgetExhausted or Error::MemoryBudgetExceeded; it never
returns a partial verdict.
Fields§
§max_steps: u64Maximum number of elementary steps (one edge relaxation or one matrix-cell update).
max_cells: usizeMaximum number of distance-matrix cells an algorithm may allocate.
Floyd-Warshall needs n * n cells for n time points.
Implementations§
Trait Implementations§
impl Copy for Budget
impl Eq for Budget
impl StructuralPartialEq for Budget
Auto Trait Implementations§
impl Forget for Budget
impl Freeze for Budget
impl Move for Budget
impl RefUnwindSafe for Budget
impl Send for Budget
impl Sync for Budget
impl Unpin for Budget
impl UnsafeUnpin for Budget
impl UnwindSafe for Budget
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