SyTen

◆ construct_product_target_order_b()

template<Rank contracted, Rank rank>
std::array<Index, rank> syten::construct_product_target_order_b ( std::array< int, rank > const &  c_b)

Given a product specifier c_b, constructs a "target order" where each leg fermionically should be such as to not induce further swaps during the product for the B-tensor.

This order can then be fed into perm_to_change_fermionic_order as the "target order" to which in turn generates a permutation. The permutation goes into is_perm_fermionic() to decide, for one specific block, if a minus sign is generated.

References std::array< T >::begin(), std::distance(), std::array< T >::end(), std::find(), if_constexpr, rank(), std::sort(), and SYTEN_ASSERT.

+ Here is the call graph for this function: