#[non_exhaustive]pub enum Strategy {
Auto,
Optimal,
Greedy,
Explicit(Vec<Vec<usize>>),
}Expand description
Selects how a contraction path is built.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Auto
Searches all contraction trees for up to eight operands and uses a greedy search above that limit.
Optimal
Searches all contraction trees without the eight-operand cutoff.
Expressions above eight operands currently use the greedy search to keep planning time bounded.
Greedy
Repeatedly contracts the pair with the lowest greedy score.
Explicit(Vec<Vec<usize>>)
Uses caller-supplied current-list indices.
Each step removes its operands and appends its intermediate.
Trait Implementations§
impl Eq for Strategy
impl StructuralPartialEq for Strategy
Auto Trait Implementations§
impl Freeze for Strategy
impl RefUnwindSafe for Strategy
impl Send for Strategy
impl Sync for Strategy
impl Unpin for Strategy
impl UnsafeUnpin for Strategy
impl UnwindSafe for Strategy
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