v0.13.2
Searching...
No Matches
Permutation4.hpp
Go to the documentation of this file.
1#pragma once
2
4
5namespace FTensor
6{
7 template <int Dim0, int Dim1, int Dim2, int Dim3, char i, char j, char k,
8 char l>
10 {
11 Permutation4() = default;
12
13 // (i,...)
14 template <class B, class U>
16 const int N0, const int N1, const int N2, const int N3)
17 {
18 return rhs(N0, N1, N2, N3);
19 }
20
21 template <class B, class U>
23 const int N0, const int N1, const int N2, const int N3)
24 {
25 return rhs(N0, N1, N3, N2);
26 }
27
28 template <class B, class U>
30 const int N0, const int N1, const int N2, const int N3)
31 {
32 return rhs(N0, N2, N1, N3);
33 }
34
35 template <class B, class U>
37 const int N0, const int N1, const int N2, const int N3)
38 {
39 return rhs(N0, N2, N3, N1);
40 }
41
42 template <class B, class U>
44 const int N0, const int N1, const int N2, const int N3)
45 {
46 return rhs(N0, N3, N1, N2);
47 }
48
49 template <class B, class U>
51 const int N0, const int N1, const int N2, const int N3)
52 {
53 return rhs(N0, N3, N2, N1);
54 }
55
56 // (j,...)
57 template <class B, class U>
59 const int N0, const int N1, const int N2, const int N3)
60 {
61 return rhs(N1, N0, N2, N3);
62 }
63
64 template <class B, class U>
66 const int N0, const int N1, const int N2, const int N3)
67 {
68 return rhs(N1, N0, N3, N2);
69 }
70
71 template <class B, class U>
73 const int N0, const int N1, const int N2, const int N3)
74 {
75 return rhs(N1, N2, N0, N3);
76 }
77
78 template <class B, class U>
80 const int N0, const int N1, const int N2, const int N3)
81 {
82 return rhs(N1, N2, N3, N0);
83 }
84
85 template <class B, class U>
87 const int N0, const int N1, const int N2, const int N3)
88 {
89 return rhs(N1, N3, N0, N2);
90 }
91
92 template <class B, class U>
94 const int N0, const int N1, const int N2, const int N3)
95 {
96 return rhs(N1, N3, N2, N0);
97 }
98
99 // (k,...)
100 template <class B, class U>
102 const int N0, const int N1, const int N2, const int N3)
103 {
104 return rhs(N2, N1, N0, N3);
105 }
106
107 template <class B, class U>
109 const int N0, const int N1, const int N2, const int N3)
110 {
111 return rhs(N2, N1, N3, N0);
112 }
113
114 template <class B, class U>
116 const int N0, const int N1, const int N2, const int N3)
117 {
118 return rhs(N2, N0, N1, N3);
119 }
120
121 template <class B, class U>
123 const int N0, const int N1, const int N2, const int N3)
124 {
125 return rhs(N2, N0, N3, N1);
126 }
127
128 template <class B, class U>
130 const int N0, const int N1, const int N2, const int N3)
131 {
132 return rhs(N2, N3, N1, N0);
133 }
134
135 template <class B, class U>
137 const int N0, const int N1, const int N2, const int N3)
138 {
139 return rhs(N2, N3, N0, N1);
140 }
141
142 // (l,...)
143 template <class B, class U>
145 const int N0, const int N1, const int N2, const int N3)
146 {
147 return rhs(N3, N1, N2, N0);
148 }
149
150 template <class B, class U>
152 const int N0, const int N1, const int N2, const int N3)
153 {
154 return rhs(N3, N1, N0, N2);
155 }
156
157 template <class B, class U>
159 const int N0, const int N1, const int N2, const int N3)
160 {
161 return rhs(N3, N2, N1, N0);
162 }
163
164 template <class B, class U>
166 const int N0, const int N1, const int N2, const int N3)
167 {
168 return rhs(N3, N2, N0, N1);
169 }
170
171 template <class B, class U>
173 const int N0, const int N1, const int N2, const int N3)
174 {
175 return rhs(N3, N0, N1, N2);
176 }
177
178 template <class B, class U>
180 const int N0, const int N1, const int N2, const int N3)
181 {
182 return rhs(N3, N0, N2, N1);
183 }
184
185 // Catch-all version for incompatible indices
186 template <class B, class U, int Dim1_0, int Dim1_1, int Dim1_2, int Dim1_3,
187 char i1, char j1, char k1, char l1>
188 U eval(const Tensor4_Expr<B, U, Dim1_0, Dim1_1, Dim1_2, Dim1_3, i1, j1, k1,
189 l1> &rhs,
190 const int N0, const int N1, const int N2, const int N3)
191 {
192 static_assert(error_when_instantiated<B>(), "Incompatible indices");
193 return rhs(0, 0, 0, 0);
194 }
195
196 // (i,...)
197 template <class B, class U>
199 const int N1, const int N2, const int N3) {
200 static_assert(Dim0 == Dim1 && Dim2 == Dim3, "Incompatible indices");
201 return rhs(N0, N1, N2, N3);
202 }
203
204 // (k,...)
205 template <class B, class U>
207 const int N1, const int N2, const int N3) {
208 static_assert(Dim2 == Dim3 & Dim0 == Dim1, "Incompatible indices");
209 return rhs(N2, N3, N0, N1);
210 }
211
212 // Catch-all version for incompatible indices
213 template <class B, class U, int Dim1_01, int Dim1_23, char i1, char j1,
214 char k1, char l1>
216 const int N0, const int N1, const int N2, const int N3) {
217 static_assert(error_when_instantiated<B>(), "Incompatible indices");
218 return rhs(0, 0, 0, 0);
219 }
220 };
221}
static Number< 2 > N2
static Number< 1 > N1
static Number< 0 > N0
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'l', 3 > l
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
Tensors class implemented by Walter Landry.
Definition: FTensor.hpp:51
U eval(const Tensor4_Expr< B, U, Dim3, Dim0, Dim1, Dim2, l, i, j, k > &rhs, const int N0, const int N1, const int N2, const int N3)
U eval(const Tensor4_Expr< B, U, Dim0, Dim1, Dim3, Dim2, i, j, l, k > &rhs, const int N0, const int N1, const int N2, const int N3)
U eval(const Tensor4_Expr< B, U, Dim2, Dim1, Dim0, Dim3, k, j, i, l > &rhs, const int N0, const int N1, const int N2, const int N3)
U eval(const Ddg_Expr< B, U, Dim0, Dim2, k, l, i, j > &rhs, const int N0, const int N1, const int N2, const int N3)
U eval(const Tensor4_Expr< B, U, Dim3, Dim2, Dim0, Dim1, l, k, i, j > &rhs, const int N0, const int N1, const int N2, const int N3)
U eval(const Tensor4_Expr< B, U, Dim3, Dim1, Dim2, Dim0, l, j, k, i > &rhs, const int N0, const int N1, const int N2, const int N3)
U eval(const Tensor4_Expr< B, U, Dim1, Dim2, Dim3, Dim0, j, k, l, i > &rhs, const int N0, const int N1, const int N2, const int N3)
U eval(const Tensor4_Expr< B, U, Dim0, Dim1, Dim2, Dim3, i, j, k, l > &rhs, const int N0, const int N1, const int N2, const int N3)
U eval(const Tensor4_Expr< B, U, Dim0, Dim2, Dim3, Dim1, i, k, l, j > &rhs, const int N0, const int N1, const int N2, const int N3)
U eval(const Tensor4_Expr< B, U, Dim1, Dim2, Dim0, Dim3, j, k, i, l > &rhs, const int N0, const int N1, const int N2, const int N3)
U eval(const Tensor4_Expr< B, U, Dim0, Dim3, Dim1, Dim2, i, l, j, k > &rhs, const int N0, const int N1, const int N2, const int N3)
U eval(const Tensor4_Expr< B, U, Dim0, Dim3, Dim2, Dim1, i, l, k, j > &rhs, const int N0, const int N1, const int N2, const int N3)
U eval(const Ddg_Expr< B, U, Dim0, Dim2, i, j, k, l > &rhs, const int N0, const int N1, const int N2, const int N3)
U eval(const Tensor4_Expr< B, U, Dim1, Dim3, Dim2, Dim0, j, l, k, i > &rhs, const int N0, const int N1, const int N2, const int N3)
U eval(const Tensor4_Expr< B, U, Dim1_0, Dim1_1, Dim1_2, Dim1_3, i1, j1, k1, l1 > &rhs, const int N0, const int N1, const int N2, const int N3)
U eval(const Tensor4_Expr< B, U, Dim1, Dim0, Dim2, Dim3, j, i, k, l > &rhs, const int N0, const int N1, const int N2, const int N3)
U eval(const Tensor4_Expr< B, U, Dim2, Dim0, Dim3, Dim1, k, i, l, j > &rhs, const int N0, const int N1, const int N2, const int N3)
U eval(const Tensor4_Expr< B, U, Dim2, Dim0, Dim1, Dim3, k, i, j, l > &rhs, const int N0, const int N1, const int N2, const int N3)
U eval(const Tensor4_Expr< B, U, Dim0, Dim2, Dim1, Dim3, i, k, j, l > &rhs, const int N0, const int N1, const int N2, const int N3)
U eval(const Tensor4_Expr< B, U, Dim2, Dim3, Dim0, Dim1, k, l, i, j > &rhs, const int N0, const int N1, const int N2, const int N3)
U eval(const Tensor4_Expr< B, U, Dim3, Dim2, Dim1, Dim0, l, k, j, i > &rhs, const int N0, const int N1, const int N2, const int N3)
U eval(const Tensor4_Expr< B, U, Dim2, Dim1, Dim3, Dim0, k, j, l, i > &rhs, const int N0, const int N1, const int N2, const int N3)
U eval(const Ddg_Expr< B, U, Dim1_01, Dim1_23, i1, j1, k1, l1 > &rhs, const int N0, const int N1, const int N2, const int N3)
U eval(const Tensor4_Expr< B, U, Dim1, Dim3, Dim0, Dim2, j, l, i, k > &rhs, const int N0, const int N1, const int N2, const int N3)
U eval(const Tensor4_Expr< B, U, Dim1, Dim0, Dim3, Dim2, j, i, l, k > &rhs, const int N0, const int N1, const int N2, const int N3)
U eval(const Tensor4_Expr< B, U, Dim3, Dim0, Dim2, Dim1, l, i, k, j > &rhs, const int N0, const int N1, const int N2, const int N3)
U eval(const Tensor4_Expr< B, U, Dim2, Dim3, Dim1, Dim0, k, l, j, i > &rhs, const int N0, const int N1, const int N2, const int N3)
U eval(const Tensor4_Expr< B, U, Dim3, Dim1, Dim0, Dim2, l, j, i, k > &rhs, const int N0, const int N1, const int N2, const int N3)