v0.5.86
Tensor4_ddg_numeral.hpp
Go to the documentation of this file.
1 /* This is for expressions where a number is used for one or more
2  slots, and an index for the others, yielding a
3  Tensor2_symmetric_Expr or Tensor3_dg_Expr. */
4 
5 /* First and second slot. */
6 
7 template<class A, class T>
9 {
10  A iterA;
11  const int N1, N2;
12 public:
13  T operator()(const int N3, const int N4) const
14  {
15  return iterA(N1,N2,N3,N4);
16  }
17  Tensor4_ddg_numeral_01(const A &a, const int NN1, const int NN2)
18  :iterA(a), N1(NN1), N2(NN2) {}
19 };
20 
21 /* Third and fourth slot. */
22 
23 template<class A, class T>
25 {
26  A iterA;
27  const int N3, N4;
28 public:
29  T operator()(const int N1, const int N2) const
30  {
31  return iterA(N1,N2,N3,N4);
32  }
33  Tensor4_ddg_numeral_23(const A &a, const int NN3, const int NN4)
34  :iterA(a), N3(NN3), N4(NN4) {}
35 };
36 
37 /* First and third slot. */
38 
39 template<class A, class T>
41 {
42  A iterA;
43  const int N1, N3;
44 public:
45  T operator()(const int N2, const int N4) const
46  {
47  return iterA(N1,N2,N3,N4);
48  }
49  Tensor4_ddg_numeral_02(const A &a, const int NN1, const int NN3)
50  :iterA(a), N1(NN1), N3(NN3) {}
51 };
52 
53 /* Only first slot */
54 
55 /* I think I have to be careful to make sure that the indices are
56  matched correctly, because the expression that calls it is a
57  Tensor3_dg. */
58 
59 template<class A, class T>
61 {
62  A iterA;
63  const int N1;
64 public:
65  T operator()(const int N2, const int N3, const int N4) const
66  {
67  return iterA(N1,N4,N2,N3);
68  }
69  Tensor4_ddg_numeral_0(const A &a, const int NN1):iterA(a), N1(NN1) {}
70 };
71 
72 /* Second, third and fourth slot. */
73 
74 template<class A, class T>
76 {
77  A iterA;
78  const int N1,N2,N3;
79 public:
80  T operator()(const int N0) const
81  {
82  return iterA(N0,N1,N2,N3);
83  }
84  Tensor4_ddg_numeral_123(const A &a, const int NN1, const int NN2,
85  const int NN3) : iterA(a), N1(NN1), N2(NN2), N3(NN3)
86  {}
87 };
T operator()(const int N0) const
T operator()(const int N1, const int N2) const
Tensor4_ddg_numeral_02(const A &a, const int NN1, const int NN3)
Tensor4_ddg_numeral_0(const A &a, const int NN1)
T operator()(const int N2, const int N4) const
Tensor4_ddg_numeral_123(const A &a, const int NN1, const int NN2, const int NN3)
T operator()(const int N3, const int N4) const
Tensor4_ddg_numeral_23(const A &a, const int NN3, const int NN4)
Tensor4_ddg_numeral_01(const A &a, const int NN1, const int NN2)
T operator()(const int N2, const int N3, const int N4) const