1 #include "../../../src/FTensor.hpp"
2 #include "../test_for_zero.hpp"
3 #include "../test_ostream.hpp"
19 for(
int i1 = 0; i1 < 2; ++i1)
20 for(
int i2 = 0; i2 < 3; ++i2)
21 for(
int i3 = 0; i3 < 4; ++i3)
24 "T4(i,j,k,l)=T4(i,j,k,l)(0," + std::to_string(i1)
25 +
"," + std::to_string(i2) +
","
26 + std::to_string(i3) +
")");
28 - 2 * t4_1(0, i1, i2, i3),
29 "T4(i,j,k,l)+T4(i,j,k,l)(0," + std::to_string(i1)
30 +
"," + std::to_string(i2) +
","
31 + std::to_string(i3) +
")");
32 test_for_zero((t4_1(
i,
j,
k,
l) - t4(
i,
j,
k,
l))(0, i1, i2, i3),
33 "T4(i,j,k,l)-T4(i,j,k,l)(0," + std::to_string(i1)
34 +
"," + std::to_string(i2) +
","
35 + std::to_string(i3) +
")");
41 for(
int i1 = 0; i1 < 2; ++i1)
42 for(
int i2 = 0; i2 < 3; ++i2)
43 for(
int i3 = 0; i3 < 4; ++i3)
46 "T4(i,j,k,l)=T4(i,j,l,k)(0," + std::to_string(i1)
47 +
"," + std::to_string(i2) +
","
48 + std::to_string(i3) +
")");
50 - 2 * t4_1(0, i1, i2, i3),
51 "T4(i,j,k,l)+T4(i,j,l,k)(0," + std::to_string(i1)
52 +
"," + std::to_string(i2) +
","
53 + std::to_string(i3) +
")");
54 test_for_zero((t4_1(
i,
j,
k,
l) - t4(
i,
j,
l,
k))(0, i1, i2, i3),
55 "T4(i,j,k,l)-T4(i,j,l,k)(0," + std::to_string(i1)
56 +
"," + std::to_string(i2) +
","
57 + std::to_string(i3) +
")");
63 for(
int i1 = 0; i1 < 2; ++i1)
64 for(
int i2 = 0; i2 < 3; ++i2)
65 for(
int i3 = 0; i3 < 4; ++i3)
68 "T4(i,j,k,l)=T4(i,k,j,l)(0," + std::to_string(i1)
69 +
"," + std::to_string(i2) +
","
70 + std::to_string(i3) +
")");
72 - 2 * t4_1(0, i1, i2, i3),
73 "T4(i,j,k,l)+T4(i,k,j,l)(0," + std::to_string(i1)
74 +
"," + std::to_string(i2) +
","
75 + std::to_string(i3) +
")");
76 test_for_zero((t4_1(
i,
j,
k,
l) - t4(
i,
k,
j,
l))(0, i1, i2, i3),
77 "T4(i,j,k,l)-T4(i,k,j,l)(0," + std::to_string(i1)
78 +
"," + std::to_string(i2) +
","
79 + std::to_string(i3) +
")");
85 for(
int i1 = 0; i1 < 2; ++i1)
86 for(
int i2 = 0; i2 < 3; ++i2)
87 for(
int i3 = 0; i3 < 4; ++i3)
90 "T4(i,j,k,l)=T4(i,k,l,j)(0," + std::to_string(i1)
91 +
"," + std::to_string(i2) +
","
92 + std::to_string(i3) +
")");
94 - 2 * t4_1(0, i1, i2, i3),
95 "T4(i,j,k,l)+T4(i,k,l,j)(0," + std::to_string(i1)
96 +
"," + std::to_string(i2) +
","
97 + std::to_string(i3) +
")");
98 test_for_zero((t4_1(
i,
j,
k,
l) - t4(
i,
k,
l,
j))(0, i1, i2, i3),
99 "T4(i,j,k,l)-T4(i,k,l,j)(0," + std::to_string(i1)
100 +
"," + std::to_string(i2) +
","
101 + std::to_string(i3) +
")");
107 for(
int i1 = 0; i1 < 2; ++i1)
108 for(
int i2 = 0; i2 < 3; ++i2)
109 for(
int i3 = 0; i3 < 4; ++i3)
112 "T4(i,j,k,l)=T4(i,l,j,k)(0," + std::to_string(i1)
113 +
"," + std::to_string(i2) +
","
114 + std::to_string(i3) +
")");
116 - 2 * t4_1(0, i1, i2, i3),
117 "T4(i,j,k,l)+T4(i,l,j,k)(0," + std::to_string(i1)
118 +
"," + std::to_string(i2) +
","
119 + std::to_string(i3) +
")");
120 test_for_zero((t4_1(
i,
j,
k,
l) - t4(
i,
l,
j,
k))(0, i1, i2, i3),
121 "T4(i,j,k,l)-T4(i,l,j,k)(0," + std::to_string(i1)
122 +
"," + std::to_string(i2) +
","
123 + std::to_string(i3) +
")");
129 for(
int i1 = 0; i1 < 2; ++i1)
130 for(
int i2 = 0; i2 < 3; ++i2)
131 for(
int i3 = 0; i3 < 4; ++i3)
134 "T4(i,j,k,l)=T4(i,l,k,j)(0," + std::to_string(i1)
135 +
"," + std::to_string(i2) +
","
136 + std::to_string(i3) +
")");
138 - 2 * t4_1(0, i1, i2, i3),
139 "T4(i,j,k,l)+T4(i,l,k,j)(0," + std::to_string(i1)
140 +
"," + std::to_string(i2) +
","
141 + std::to_string(i3) +
")");
142 test_for_zero((t4_1(
i,
j,
k,
l) - t4(
i,
l,
k,
j))(0, i1, i2, i3),
143 "T4(i,j,k,l)-T4(i,l,k,j)(0," + std::to_string(i1)
144 +
"," + std::to_string(i2) +
","
145 + std::to_string(i3) +
")");
153 for(
int i1 = 0; i1 < 2; ++i1)
154 for(
int i2 = 0; i2 < 3; ++i2)
155 for(
int i3 = 0; i3 < 4; ++i3)
158 "T4(j,i,k,l)=T4(i,j,k,l)(0," + std::to_string(i1)
159 +
"," + std::to_string(i2) +
","
160 + std::to_string(i3) +
")");
162 - 2 * t4_1(0, i1, i2, i3),
163 "T4(j,i,k,l)+T4(i,j,k,l)(0," + std::to_string(i1)
164 +
"," + std::to_string(i2) +
","
165 + std::to_string(i3) +
")");
166 test_for_zero((t4_1(
i,
j,
k,
l) - t4(
j,
i,
k,
l))(0, i1, i2, i3),
167 "T4(j,i,k,l)-T4(i,j,k,l)(0," + std::to_string(i1)
168 +
"," + std::to_string(i2) +
","
169 + std::to_string(i3) +
")");
175 for(
int i1 = 0; i1 < 2; ++i1)
176 for(
int i2 = 0; i2 < 3; ++i2)
177 for(
int i3 = 0; i3 < 4; ++i3)
180 "T4(i,j,k,l)=T4(j,i,l,k)(0," + std::to_string(i1)
181 +
"," + std::to_string(i2) +
","
182 + std::to_string(i3) +
")");
184 - 2 * t4_1(0, i1, i2, i3),
185 "T4(i,j,k,l)+T4(j,i,l,k)(0," + std::to_string(i1)
186 +
"," + std::to_string(i2) +
","
187 + std::to_string(i3) +
")");
188 test_for_zero((t4_1(
i,
j,
k,
l) - t4(
j,
i,
l,
k))(0, i1, i2, i3),
189 "T4(i,j,k,l)-T4(j,i,l,k)(0," + std::to_string(i1)
190 +
"," + std::to_string(i2) +
","
191 + std::to_string(i3) +
")");
197 for(
int i1 = 0; i1 < 2; ++i1)
198 for(
int i2 = 0; i2 < 3; ++i2)
199 for(
int i3 = 0; i3 < 4; ++i3)
202 "T4(i,j,k,l)=T4(j,k,i,l)(0," + std::to_string(i1)
203 +
"," + std::to_string(i2) +
","
204 + std::to_string(i3) +
")");
206 - 2 * t4_1(0, i1, i2, i3),
207 "T4(i,j,k,l)+T4(j,k,i,l)(0," + std::to_string(i1)
208 +
"," + std::to_string(i2) +
","
209 + std::to_string(i3) +
")");
210 test_for_zero((t4_1(
i,
j,
k,
l) - t4(
j,
k,
i,
l))(0, i1, i2, i3),
211 "T4(i,j,k,l)-T4(j,k,i,l)(0," + std::to_string(i1)
212 +
"," + std::to_string(i2) +
","
213 + std::to_string(i3) +
")");
219 for(
int i1 = 0; i1 < 2; ++i1)
220 for(
int i2 = 0; i2 < 3; ++i2)
221 for(
int i3 = 0; i3 < 4; ++i3)
224 "T4(i,j,k,l)=T4(j,k,l,i)(0," + std::to_string(i1)
225 +
"," + std::to_string(i2) +
","
226 + std::to_string(i3) +
")");
228 - 2 * t4_1(0, i1, i2, i3),
229 "T4(i,j,k,l)+T4(j,k,l,i)(0," + std::to_string(i1)
230 +
"," + std::to_string(i2) +
","
231 + std::to_string(i3) +
")");
232 test_for_zero((t4_1(
i,
j,
k,
l) - t4(
j,
k,
l,
i))(0, i1, i2, i3),
233 "T4(i,j,k,l)-T4(j,k,l,i)(0," + std::to_string(i1)
234 +
"," + std::to_string(i2) +
","
235 + std::to_string(i3) +
")");
241 for(
int i1 = 0; i1 < 2; ++i1)
242 for(
int i2 = 0; i2 < 3; ++i2)
243 for(
int i3 = 0; i3 < 4; ++i3)
246 "T4(i,j,k,l)=T4(j,l,i,k)(0," + std::to_string(i1)
247 +
"," + std::to_string(i2) +
","
248 + std::to_string(i3) +
")");
250 - 2 * t4_1(0, i1, i2, i3),
251 "T4(i,j,k,l)+T4(j,l,i,k)(0," + std::to_string(i1)
252 +
"," + std::to_string(i2) +
","
253 + std::to_string(i3) +
")");
254 test_for_zero((t4_1(
i,
j,
k,
l) - t4(
j,
l,
i,
k))(0, i1, i2, i3),
255 "T4(i,j,k,l)-T4(j,l,i,k)(0," + std::to_string(i1)
256 +
"," + std::to_string(i2) +
","
257 + std::to_string(i3) +
")");
263 for(
int i1 = 0; i1 < 2; ++i1)
264 for(
int i2 = 0; i2 < 3; ++i2)
265 for(
int i3 = 0; i3 < 4; ++i3)
268 "T4(i,j,k,l)=T4(j,l,k,i)(0," + std::to_string(i1)
269 +
"," + std::to_string(i2) +
","
270 + std::to_string(i3) +
")");
272 - 2 * t4_1(0, i1, i2, i3),
273 "T4(i,j,k,l)+T4(j,l,k,i)(0," + std::to_string(i1)
274 +
"," + std::to_string(i2) +
","
275 + std::to_string(i3) +
")");
276 test_for_zero((t4_1(
i,
j,
k,
l) - t4(
j,
l,
k,
i))(0, i1, i2, i3),
277 "T4(i,j,k,l)-T4(j,l,k,i)(0," + std::to_string(i1)
278 +
"," + std::to_string(i2) +
","
279 + std::to_string(i3) +
")");
287 for(
int i1 = 0; i1 < 2; ++i1)
288 for(
int i2 = 0; i2 < 3; ++i2)
289 for(
int i3 = 0; i3 < 4; ++i3)
292 "T4(k,j,i,l)=T4(i,j,k,l)(0," + std::to_string(i1)
293 +
"," + std::to_string(i2) +
","
294 + std::to_string(i3) +
")");
296 - 2 * t4_1(0, i1, i2, i3),
297 "T4(k,j,i,l)+T4(i,j,k,l)(0," + std::to_string(i1)
298 +
"," + std::to_string(i2) +
","
299 + std::to_string(i3) +
")");
300 test_for_zero((t4_1(
i,
j,
k,
l) - t4(
k,
j,
i,
l))(0, i1, i2, i3),
301 "T4(k,j,i,l)-T4(i,j,k,l)(0," + std::to_string(i1)
302 +
"," + std::to_string(i2) +
","
303 + std::to_string(i3) +
")");
309 for(
int i1 = 0; i1 < 2; ++i1)
310 for(
int i2 = 0; i2 < 3; ++i2)
311 for(
int i3 = 0; i3 < 4; ++i3)
314 "T4(i,j,k,l)=T4(k,j,l,i)(0," + std::to_string(i1)
315 +
"," + std::to_string(i2) +
","
316 + std::to_string(i3) +
")");
318 - 2 * t4_1(0, i1, i2, i3),
319 "T4(i,j,k,l)+T4(k,j,l,i)(0," + std::to_string(i1)
320 +
"," + std::to_string(i2) +
","
321 + std::to_string(i3) +
")");
322 test_for_zero((t4_1(
i,
j,
k,
l) - t4(
k,
j,
l,
i))(0, i1, i2, i3),
323 "T4(i,j,k,l)-T4(k,j,l,i)(0," + std::to_string(i1)
324 +
"," + std::to_string(i2) +
","
325 + std::to_string(i3) +
")");
331 for(
int i1 = 0; i1 < 2; ++i1)
332 for(
int i2 = 0; i2 < 3; ++i2)
333 for(
int i3 = 0; i3 < 4; ++i3)
336 "T4(i,j,k,l)=T4(k,i,j,l)(0," + std::to_string(i1)
337 +
"," + std::to_string(i2) +
","
338 + std::to_string(i3) +
")");
340 - 2 * t4_1(0, i1, i2, i3),
341 "T4(i,j,k,l)+T4(k,i,j,l)(0," + std::to_string(i1)
342 +
"," + std::to_string(i2) +
","
343 + std::to_string(i3) +
")");
344 test_for_zero((t4_1(
i,
j,
k,
l) - t4(
k,
i,
j,
l))(0, i1, i2, i3),
345 "T4(i,j,k,l)-T4(k,i,j,l)(0," + std::to_string(i1)
346 +
"," + std::to_string(i2) +
","
347 + std::to_string(i3) +
")");
353 for(
int i1 = 0; i1 < 2; ++i1)
354 for(
int i2 = 0; i2 < 3; ++i2)
355 for(
int i3 = 0; i3 < 4; ++i3)
358 "T4(i,j,k,l)=T4(k,i,l,j)(0," + std::to_string(i1)
359 +
"," + std::to_string(i2) +
","
360 + std::to_string(i3) +
")");
362 - 2 * t4_1(0, i1, i2, i3),
363 "T4(i,j,k,l)+T4(k,i,l,j)(0," + std::to_string(i1)
364 +
"," + std::to_string(i2) +
","
365 + std::to_string(i3) +
")");
366 test_for_zero((t4_1(
i,
j,
k,
l) - t4(
k,
i,
l,
j))(0, i1, i2, i3),
367 "T4(i,j,k,l)-T4(k,i,l,j)(0," + std::to_string(i1)
368 +
"," + std::to_string(i2) +
","
369 + std::to_string(i3) +
")");
375 for(
int i1 = 0; i1 < 2; ++i1)
376 for(
int i2 = 0; i2 < 3; ++i2)
377 for(
int i3 = 0; i3 < 4; ++i3)
380 "T4(i,j,k,l)=T4(k,l,j,i)(0," + std::to_string(i1)
381 +
"," + std::to_string(i2) +
","
382 + std::to_string(i3) +
")");
384 - 2 * t4_1(0, i1, i2, i3),
385 "T4(i,j,k,l)+T4(k,l,j,i)(0," + std::to_string(i1)
386 +
"," + std::to_string(i2) +
","
387 + std::to_string(i3) +
")");
388 test_for_zero((t4_1(
i,
j,
k,
l) - t4(
k,
l,
j,
i))(0, i1, i2, i3),
389 "T4(i,j,k,l)-T4(k,l,j,i)(0," + std::to_string(i1)
390 +
"," + std::to_string(i2) +
","
391 + std::to_string(i3) +
")");
397 for(
int i1 = 0; i1 < 2; ++i1)
398 for(
int i2 = 0; i2 < 3; ++i2)
399 for(
int i3 = 0; i3 < 4; ++i3)
402 "T4(i,j,k,l)=T4(k,l,i,j)(0," + std::to_string(i1)
403 +
"," + std::to_string(i2) +
","
404 + std::to_string(i3) +
")");
406 - 2 * t4_1(0, i1, i2, i3),
407 "T4(i,j,k,l)+T4(k,l,i,j)(0," + std::to_string(i1)
408 +
"," + std::to_string(i2) +
","
409 + std::to_string(i3) +
")");
410 test_for_zero((t4_1(
i,
j,
k,
l) - t4(
k,
l,
i,
j))(0, i1, i2, i3),
411 "T4(i,j,k,l)-T4(k,l,i,j)(0," + std::to_string(i1)
412 +
"," + std::to_string(i2) +
","
413 + std::to_string(i3) +
")");
421 for(
int i1 = 0; i1 < 2; ++i1)
422 for(
int i2 = 0; i2 < 3; ++i2)
423 for(
int i3 = 0; i3 < 4; ++i3)
426 "T4(l,j,k,i)=T4(i,j,k,l)(0," + std::to_string(i1)
427 +
"," + std::to_string(i2) +
","
428 + std::to_string(i3) +
")");
430 - 2 * t4_1(0, i1, i2, i3),
431 "T4(l,j,k,i)+T4(i,j,k,l)(0," + std::to_string(i1)
432 +
"," + std::to_string(i2) +
","
433 + std::to_string(i3) +
")");
434 test_for_zero((t4_1(
i,
j,
k,
l) - t4(
l,
j,
k,
i))(0, i1, i2, i3),
435 "T4(l,j,k,i)-T4(i,j,k,l)(0," + std::to_string(i1)
436 +
"," + std::to_string(i2) +
","
437 + std::to_string(i3) +
")");
443 for(
int i1 = 0; i1 < 2; ++i1)
444 for(
int i2 = 0; i2 < 3; ++i2)
445 for(
int i3 = 0; i3 < 4; ++i3)
448 "T4(i,j,k,l)=T4(l,j,i,k)(0," + std::to_string(i1)
449 +
"," + std::to_string(i2) +
","
450 + std::to_string(i3) +
")");
452 - 2 * t4_1(0, i1, i2, i3),
453 "T4(i,j,k,l)+T4(l,j,i,k)(0," + std::to_string(i1)
454 +
"," + std::to_string(i2) +
","
455 + std::to_string(i3) +
")");
456 test_for_zero((t4_1(
i,
j,
k,
l) - t4(
l,
j,
i,
k))(0, i1, i2, i3),
457 "T4(i,j,k,l)-T4(l,j,i,k)(0," + std::to_string(i1)
458 +
"," + std::to_string(i2) +
","
459 + std::to_string(i3) +
")");
465 for(
int i1 = 0; i1 < 2; ++i1)
466 for(
int i2 = 0; i2 < 3; ++i2)
467 for(
int i3 = 0; i3 < 4; ++i3)
470 "T4(i,j,k,l)=T4(l,k,j,i)(0," + std::to_string(i1)
471 +
"," + std::to_string(i2) +
","
472 + std::to_string(i3) +
")");
474 - 2 * t4_1(0, i1, i2, i3),
475 "T4(i,j,k,l)+T4(l,k,j,i)(0," + std::to_string(i1)
476 +
"," + std::to_string(i2) +
","
477 + std::to_string(i3) +
")");
478 test_for_zero((t4_1(
i,
j,
k,
l) - t4(
l,
k,
j,
i))(0, i1, i2, i3),
479 "T4(i,j,k,l)-T4(l,k,j,i)(0," + std::to_string(i1)
480 +
"," + std::to_string(i2) +
","
481 + std::to_string(i3) +
")");
487 for(
int i1 = 0; i1 < 2; ++i1)
488 for(
int i2 = 0; i2 < 3; ++i2)
489 for(
int i3 = 0; i3 < 4; ++i3)
492 "T4(i,j,k,l)=T4(l,k,i,j)(0," + std::to_string(i1)
493 +
"," + std::to_string(i2) +
","
494 + std::to_string(i3) +
")");
496 - 2 * t4_1(0, i1, i2, i3),
497 "T4(i,j,k,l)+T4(l,k,i,j)(0," + std::to_string(i1)
498 +
"," + std::to_string(i2) +
","
499 + std::to_string(i3) +
")");
500 test_for_zero((t4_1(
i,
j,
k,
l) - t4(
l,
k,
i,
j))(0, i1, i2, i3),
501 "T4(i,j,k,l)-T4(l,k,i,j)(0," + std::to_string(i1)
502 +
"," + std::to_string(i2) +
","
503 + std::to_string(i3) +
")");
509 for(
int i1 = 0; i1 < 2; ++i1)
510 for(
int i2 = 0; i2 < 3; ++i2)
511 for(
int i3 = 0; i3 < 4; ++i3)
514 "T4(i,j,k,l)=T4(l,i,j,k)(0," + std::to_string(i1)
515 +
"," + std::to_string(i2) +
","
516 + std::to_string(i3) +
")");
518 - 2 * t4_1(0, i1, i2, i3),
519 "T4(i,j,k,l)+T4(l,i,j,k)(0," + std::to_string(i1)
520 +
"," + std::to_string(i2) +
","
521 + std::to_string(i3) +
")");
522 test_for_zero((t4_1(
i,
j,
k,
l) - t4(
l,
i,
j,
k))(0, i1, i2, i3),
523 "T4(i,j,k,l)-T4(l,i,j,k)(0," + std::to_string(i1)
524 +
"," + std::to_string(i2) +
","
525 + std::to_string(i3) +
")");
531 for(
int i1 = 0; i1 < 2; ++i1)
532 for(
int i2 = 0; i2 < 3; ++i2)
533 for(
int i3 = 0; i3 < 4; ++i3)
536 "T4(i,j,k,l)=T4(l,i,k,j)(0," + std::to_string(i1)
537 +
"," + std::to_string(i2) +
","
538 + std::to_string(i3) +
")");
540 - 2 * t4_1(0, i1, i2, i3),
541 "T4(i,j,k,l)+T4(l,i,k,j)(0," + std::to_string(i1)
542 +
"," + std::to_string(i2) +
","
543 + std::to_string(i3) +
")");
544 test_for_zero((t4_1(
i,
j,
k,
l) - t4(
l,
i,
k,
j))(0, i1, i2, i3),
545 "T4(i,j,k,l)-T4(l,i,k,j)(0," + std::to_string(i1)
546 +
"," + std::to_string(i2) +
","
547 + std::to_string(i3) +
")");