cMHN 1.2
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
reference.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_TENSOR_TRAIN_OPERATOR_VIEWS_REFERENCE_H
4#define pRC_TENSOR_TRAIN_OPERATOR_VIEWS_REFERENCE_H
5
7
9{
10 template<class T, class M, class N, class Ranks>
11 class Reference;
12
13 template<class T, class M, class N, class Ranks>
15
16 template<class T, class M, class N, class Ranks>
18 : public Assignable<T, M, N, Ranks, Reference<T, M, N, Ranks>>
19 {
20 private:
22
23 public:
25 : mA(a)
26 {
27 }
28
29 using Base::operator=;
30
31 template<Index C>
32 constexpr decltype(auto) core()
33 {
34 return mA.template core<C>();
35 }
36
37 template<Index C>
38 constexpr decltype(auto) core() const
39 {
40 return asConst(mA).template core<C>();
41 }
42
43 private:
45 };
46}
47#endif // pRC_TENSOR_TRAIN_OPERATOR_VIEWS_REFERENCE_H
constexpr decltype(auto) core()
Definition reference.hpp:32
Reference(Operator< T, M, N, Ranks > &a)
Definition reference.hpp:24
constexpr decltype(auto) core() const
Definition reference.hpp:38
Definition declarations.hpp:20
Definition declarations.hpp:23
Reference(Operator< T, M, N, Ranks > &) -> Reference< T, M, N, Ranks >
static constexpr AddConst< X > & asConst(X &a)
Definition basics.hpp:71