pub enum PathStrategy {
Greedy,
Optimal,
}Expand description
Strategy for finding the contraction path.
Variants§
Greedy
Greedy heuristic: at each step, contract the pair with the smallest intermediate tensor. O(n^3) in the number of operands.
Optimal
Exhaustive search: tries all possible contraction orderings and picks the one with the lowest total FLOP count. O(n!) — only practical for ≤ ~6 operands.
Trait Implementations§
Source§impl Clone for PathStrategy
impl Clone for PathStrategy
Source§fn clone(&self) -> PathStrategy
fn clone(&self) -> PathStrategy
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PathStrategy
impl Debug for PathStrategy
Source§impl PartialEq for PathStrategy
impl PartialEq for PathStrategy
impl Copy for PathStrategy
impl Eq for PathStrategy
impl StructuralPartialEq for PathStrategy
Auto Trait Implementations§
impl Freeze for PathStrategy
impl RefUnwindSafe for PathStrategy
impl Send for PathStrategy
impl Sync for PathStrategy
impl Unpin for PathStrategy
impl UnsafeUnpin for PathStrategy
impl UnwindSafe for PathStrategy
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