Function sequant::subset_target_indices¶
Defined in File indices.hpp
Function Documentation¶
-
auto sequant::subset_target_indices(meta::range_of<Index, 2> auto const &rng, meta::range_of<Index> auto const &tixs)¶
Determines the target indices for all subsets of a given range of index groups.
This function computes the set of “target” indices for each subset of
rng. An index is considered a target for a subset if it appears exactly once within that subset (making it an open index for that subset) or if it is present in the providedtixs(target indices) and also appears in the subset. Additionally, indices that appear in the subset and also appear in the complementary subset (implied bycounts.at(counts.size() - i - 1).contains(k)) are included, which effectively identifies contracted indices that need to be preserved as open indices if they are matched in the complement.- Parameters:
- Returns:
A vector of sets, where
result[mask]contains the set of targetIndexobjects for the subset defined bymask.