cMHN 1.2
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
sub.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_TENSOR_TRAIN_COMMON_FUNCTIONS_SUB_H
4#define pRC_TENSOR_TRAIN_COMMON_FUNCTIONS_SUB_H
5
10
11namespace pRC
12{
13 template<class XA, class XB, class RA = RemoveReference<XA>,
14 class RB = RemoveReference<XB>>
15 requires((TensorTrain::IsTensorish<RA> &&
16 TensorTrain::IsTensorish<RB>) ||
17 (TensorTrain::IsOperatorish<RA> &&
18 TensorTrain::IsOperatorish<RB>)) &&
19 IsInvocable<Minus, XB> && IsInvocable<Add, XA, ResultOf<Minus, XB>>
20 static inline constexpr auto operator-(XA &&a, XB &&b)
21 {
22 return forward<XA>(a) + (-forward<XB>(b));
23 }
24}
25#endif // pRC_TENSOR_TRAIN_COMMON_FUNCTIONS_SUB_H
Definition cholesky.hpp:10