Skip to main content

contract

Function contract 

Source
pub fn contract<T, V>(
    tn_a: &TreeTN<T, V>,
    tn_b: &TreeTN<T, V>,
    center: &V,
    options: ContractionOptions,
) -> Result<TreeTN<T, V>>
where T: TensorLike, <T::Index as IndexLike>::Id: Clone + Hash + Eq + Ord + Debug + Send + Sync, V: Clone + Hash + Eq + Ord + Send + Sync + Debug,
Expand description

Contract two TreeTNs using the specified method.

This is the main entry point for TreeTN contraction. It dispatches to the appropriate algorithm based on the options.