|
inline |
Product wrapper for generic dense tensors.
Forwards to the appropriate implementation.
a | the first tensor |
b | the second tensor |
c_a | the product specification for the first tensor |
c_b | the product specification for the second tensor |
conjugate | if true, complex-conjugate the elements of b |
ezeros | if equal to EliminateZeros::Yes, small zeros arising from not-small columns and rows will be eliminated. |
tts | if non-nullptr, used to temporarily store transposed arrays |
summed | number of contracted indices |
frank | rank of first tensor |
srank | rank of second tensor |
Scalar | scalar type of the tensors, usually std::complex<double> |
If a value c_a[i-1]
is positive, the i
-th leg of a
will be contracted with the leg j
of b
for which c_b[j] = c_a[i]
. If the value is negative, the leg will be taken as the -c_a[i-1]
-th output leg. Positive numbers have to include all numbers (inclusive) between 1
and summed
. Negative numbers have to include all numbers (inclusive) between -1
and -frank - srank + 2 * summed
.
prodD<2>(a, b, {-3, 1, -1, 2}, {2, -2, 1})
is equivalent to \( R_{ijk} = \sum_{lm} A_{klim} B_{mjl} \) References syten::GenericDenseTensorImpl::GenericDenseTensor< rank, Scalar >::storage.