cMHN 1.1
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
apply.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_TENSOR_TRAIN_OPERATOR_FUNCTIONS_APPLY_H
4#define pRC_TENSOR_TRAIN_OPERATOR_FUNCTIONS_APPLY_H
5
14
15namespace pRC
16{
22 If<Any<TensorTrain::IsOperatorish<RB>, TensorTrain::IsTensorish<RB>>> =
23 0,
26 XB>> = 0>
27 static inline constexpr auto apply(XA &&a, XB &&b)
28 {
29 return restrict<OR>(transform<OT>(forward<XA>(a))) * forward<XB>(b);
30 }
31
37 If<Any<TensorTrain::IsOperatorish<RB>, TensorTrain::IsTensorish<RB>>> =
38 0,
41 static inline constexpr auto apply(XA &&a, XB &&b)
42 {
43 return eval(apply<OT, OR, OH>(a, b));
44 }
45}
46#endif // pRC_TENSOR_TRAIN_OPERATOR_FUNCTIONS_APPLY_H
Restrict
Definition restrict.hpp:11
Hint
Definition hint.hpp:9
Transform
Definition transform.hpp:11
Definition cholesky.hpp:18
static constexpr X eval(X &&a)
Definition eval.hpp:11
static constexpr decltype(auto) apply(JacobiRotation< T > const &r, X &&m, Index const p, Index const q)
Definition jacobi_rotation.hpp:334
static constexpr auto makeConstantSequence()
Definition sequence.hpp:402