Function tensor_product

Source
pub fn tensor_product<N1, N2, E1, E2, Ix>(
    graph1: &Graph<N1, E1, Ix>,
    graph2: &Graph<N2, E2, Ix>,
) -> Graph<(N1, N2), (), Ix>
where N1: Node + Clone, N2: Node + Clone, E1: EdgeWeight, E2: EdgeWeight, Ix: IndexType,
Expand description

Computes the tensor product (Kronecker product) of two graphs

The tensor product G ⊗ H has vertex set V(G) × V(H) and edge set {((u₁,v₁),(u₂,v₂)) : (u₁,u₂) ∈ E(G) and (v₁,v₂) ∈ E(H)}.