Template Function sequant::opt::detail::outer_product_connectivity¶
Defined in File single_term_detail.hpp
Function Documentation¶
-
template<typename TIdxs>
inline container::vector<char> sequant::opt::detail::outer_product_connectivity(TensorNetwork const &network, TIdxs const &tidxs, bool prune = true)¶ Outer-product pruning mask for a term. Returns connected_subsets over contractible_adjacency, EXCEPT it returns an all-connected mask when pruning is disabled (
prune== false, or the envSEQUANT_DISABLE_OUTER_PRODUCT_PRUNINGforce-override) or when the full network is itself disconnected (a genuine product term — never a CC residual summand, by the linked-cluster theorem). Callers then apply one uniformif (!mask[n]) skiptest and get unpruned behavior in those cases.- Parameters:
prune – Whether to prune (OptimizeOptions::prune_outer_products). When false, the returned mask is all-connected (unpruned DP).