cMHN 1.2
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
outer_product.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_CORE_TENSOR_FUNCTIONS_OUTER_PRODUCT_H
4#define pRC_CORE_TENSOR_FUNCTIONS_OUTER_PRODUCT_H
5
9
10namespace pRC
11{
12 template<class XA, class XB, IsTensorish RA = RemoveReference<XA>,
13 IsTensorish RB = RemoveReference<XB>>
14 requires IsInvocable<TensorProduct, XA, ResultOf<Conj, XB>>
15 static inline constexpr auto outerProduct(XA &&a, XB &&b)
16 {
17 return tensorProduct(forward<XA>(a), conj(forward<XB>(b)));
18 }
19}
20#endif // pRC_CORE_TENSOR_FUNCTIONS_OUTER_PRODUCT_H
Definition cholesky.hpp:10
static constexpr auto conj(T const &a)
Definition conj.hpp:11
static constexpr auto outerProduct(XA &&a, XB &&b)
Definition outer_product.hpp:15
static constexpr auto tensorProduct(XA &&a, XB &&b)
Definition tensor_product.hpp:17