SyTen

◆ expansion() [2/2]

template<Rank rank>
Tensor<rank> syten::expansion ( Tensor< rank > const &  a,
Tensor< rank > const &  b,
ConstSpan< Index > const &  w 
)
inline

Combines the two tensors a and b into a new tensor.

For each leg i, if w[i] is positive, the two bases of a and b are combined, if it is zero, they are taken to be identical. See the relevant function for dense tensors for examples.

References combineBasisExpansion(), syten::Basis::compatible(), syten::Tensor< rank >::dense_is_standard(), syten::Basis::dir, syten::Tensor< rank >::dirs, syten::Tensor< rank >::emplace_back(), expansion(), syten::Tensor< rank >::getBasis(), std::vector< T >::push_back(), rank(), syten::Tensor< rank >::reserve(), resize(), syten::Tensor< rank >::return_as_dense_standard(), syten::Tensor< rank >::size(), SYTEN_ASSERT, and SYTEN_ASSERT_DEBUG.

+ Here is the call graph for this function: