|
| v0.14.0
|
Go to the documentation of this file.
17 #include "../permute.hpp"
23 template <
class A,
class T,
int Dim0,
int Dim1,
int Dim2,
int Dim3,
char i,
24 char j,
char k,
char l>
31 T
operator()(
const int N1,
const int N2,
const int N3,
const int N4)
const
33 return iter(N1, N2, N3, N4);
37 template <
class A,
class T,
int Dim0,
int Dim1,
int Dim2,
int Dim3,
char i,
38 char j,
char k,
char l>
46 T &
operator()(
const int N1,
const int N2,
const int N3,
const int N4)
48 return iter(N1, N2, N3, N4);
50 T
operator()(
const int N1,
const int N2,
const int N3,
const int N4)
const
52 return iter(N1, N2, N3, N4);
59 template <
class B,
class U,
int Dim1_0,
int Dim1_1,
int Dim1_2,
int Dim1_3,
60 char i_1,
char j_1,
char k_1,
char l_1>
64 for(
int ii = 0; ii < Dim0; ++ii)
65 for(
int jj = 0; jj < Dim1; ++jj)
66 for(
int kk = 0; kk < Dim2; ++kk)
67 for(
int ll = 0; ll < Dim3; ++ll)
69 iter(ii, jj, kk, ll) =
permute(*
this, rhs, ii, jj, kk, ll);
74 template <
class B,
class U,
int Dim1_0,
int Dim1_1,
int Dim1_2,
int Dim1_3,
75 char i_1,
char j_1,
char k_1,
char l_1>
77 i_1, j_1, k_1, l_1> &rhs)
84 Dim1, Dim2, Dim3,
i,
j,
k,
l> &rhs)
89 template <
class B,
class U,
int Dim01,
int Dim23,
char i_1,
char j_1,
93 for(
int ii = 0; ii != Dim01; ++ii)
94 for(
int jj = 0; jj != Dim01; ++jj)
95 for(
int kk = 0; kk != Dim23; ++kk)
96 for (
int ll = 0; ll != Dim23; ++ll) {
97 iter(ii, jj, kk, ll) =
permute(*
this, rhs, ii, jj, kk, ll);
102 template <
class B,
class U,
int Dim01,
int Dim23,
char i_1,
char j_1,
109 template <
class B,
class U,
int Dim1_0,
int Dim1_1,
int Dim1_2,
int Dim1_3,
110 char i_1,
char j_1,
char k_1,
char l_1>
112 i_1, j_1, k_1, l_1> &rhs)
114 for(
int ii = 0; ii < Dim0; ++ii)
115 for(
int jj = 0; jj < Dim1; ++jj)
116 for(
int kk = 0; kk < Dim2; ++kk)
117 for(
int ll = 0; ll < Dim3; ++ll)
119 iter(ii, jj, kk, ll) +=
permute(*
this, rhs, ii, jj, kk, ll);
124 template <
class B,
class U,
int Dim1_0,
int Dim1_1,
int Dim1_2,
int Dim1_3,
125 char i_1,
char j_1,
char k_1,
char l_1>
127 i_1, j_1, k_1, l_1> &rhs)
129 for(
int ii = 0; ii < Dim0; ++ii)
130 for(
int jj = 0; jj < Dim1; ++jj)
131 for(
int kk = 0; kk < Dim2; ++kk)
132 for(
int ll = 0; ll < Dim3; ++ll)
134 iter(ii, jj, kk, ll) +=
permute(*
this, rhs, ii, jj, kk, ll);
139 template <
class B,
class U,
int Dim01,
int Dim23,
char i_1,
char j_1,
143 for (
int ii = 0; ii != Dim01; ++ii)
144 for (
int jj = 0; jj != Dim01; ++jj)
145 for (
int kk = 0; kk != Dim23; ++kk)
146 for (
int ll = 0; ll != Dim23; ++ll) {
147 iter(ii, jj, kk, ll) += rhs(ii, jj, kk, ll);
152 template <
class B,
class U,
int Dim01,
int Dim23,
char i_1,
char j_1,
156 for (
int ii = 0; ii != Dim01; ++ii)
157 for (
int jj = 0; jj != Dim01; ++jj)
158 for (
int kk = 0; kk != Dim23; ++kk)
159 for (
int ll = 0; ll != Dim23; ++ll) {
160 iter(ii, jj, kk, ll) -= rhs(ii, jj, kk, ll);
166 for (
int ii = 0; ii != Dim0; ++ii)
167 for (
int jj = 0; jj != Dim1; ++jj)
168 for (
int kk = 0; kk != Dim2; ++kk)
169 for (
int ll = 0; ll != Dim3; ++ll)
170 iter(ii, jj, kk, ll) =
d;
175 for (
int ii = 0; ii != Dim0; ++ii)
176 for (
int jj = 0; jj != Dim1; ++jj)
177 for (
int kk = 0; kk != Dim2; ++kk)
178 for (
int ll = 0; ll != Dim3; ++ll)
179 iter(ii, jj, kk, ll) *=
d;
184 for (
int ii = 0; ii != Dim0; ++ii)
185 for (
int jj = 0; jj != Dim1; ++jj)
186 for (
int kk = 0; kk != Dim2; ++kk)
187 for (
int ll = 0; ll != Dim3; ++ll)
188 iter(ii, jj, kk, ll) /=
d;
FTensor::Tensor4_Expr< Tensor4< A, Dim0, Dim1, Dim2, Dim3 >, T, Dim0, Dim1, Dim2, Dim3, i, j, k, l >::operator+= auto & operator+=(const Tensor4_Expr< B, U, Dim1_0, Dim1_1, Dim1_2, Dim1_3, i_1, j_1, k_1, l_1 > &rhs)
T operator()(const int N1, const int N2, const int N3, const int N4) const
const Tensor1_Expr< const dTensor0< T, Dim, i >, typename promote< T, double >::V, Dim, i > d(const Tensor0< T * > &a, const Index< i, Dim > index, const Tensor1< int, Dim > &d_ijk, const Tensor1< double, Dim > &d_xyz)
FTensor::Tensor4_Expr< Tensor4< A, Dim0, Dim1, Dim2, Dim3 >, T, Dim0, Dim1, Dim2, Dim3, i, j, k, l >::Tensor4_Expr Tensor4_Expr(Tensor4< A, Dim0, Dim1, Dim2, Dim3 > &a)
U permute(const Tensor2_Expr< A, T, Dim0_0, Dim0_1, i0, j0 > &, const Tensor2_Expr< B, U, Dim1_0, Dim1_1, i1, j1 > &rhs, const int N0, const int N1)
FTensor::Tensor4_Expr< Tensor4< A, Dim0, Dim1, Dim2, Dim3 >, T, Dim0, Dim1, Dim2, Dim3, i, j, k, l >::operator() T operator()(const int N1, const int N2, const int N3, const int N4) const
FTensor::Tensor4_Expr< Tensor4< A, Dim0, Dim1, Dim2, Dim3 >, T, Dim0, Dim1, Dim2, Dim3, i, j, k, l >::equals auto & equals(const Ddg_Expr< B, U, Dim01, Dim23, i_1, j_1, k_1, l_1 > &rhs)
FTensor::Tensor4_Expr< Tensor4< A, Dim0, Dim1, Dim2, Dim3 >, T, Dim0, Dim1, Dim2, Dim3, i, j, k, l >::operator-= auto & operator-=(const Ddg_Expr< B, U, Dim01, Dim23, i_1, j_1, k_1, l_1 > &rhs)
FTensor::Tensor4_Expr< Tensor4< A, Dim0, Dim1, Dim2, Dim3 >, T, Dim0, Dim1, Dim2, Dim3, i, j, k, l >::operator() T & operator()(const int N1, const int N2, const int N3, const int N4)
FTensor::Tensor4_Expr< Tensor4< A, Dim0, Dim1, Dim2, Dim3 >, T, Dim0, Dim1, Dim2, Dim3, i, j, k, l >::operator= auto & operator=(const Tensor4_Expr< B, U, Dim1_0, Dim1_1, Dim1_2, Dim1_3, i_1, j_1, k_1, l_1 > &rhs)
FTensor::Tensor4_Expr< Tensor4< A, Dim0, Dim1, Dim2, Dim3 >, T, Dim0, Dim1, Dim2, Dim3, i, j, k, l >::operator-= auto & operator-=(const Tensor4_Expr< B, U, Dim1_0, Dim1_1, Dim1_2, Dim1_3, i_1, j_1, k_1, l_1 > &rhs)
FTensor::Tensor4_Expr< Tensor4< A, Dim0, Dim1, Dim2, Dim3 >, T, Dim0, Dim1, Dim2, Dim3, i, j, k, l >::operator+= auto & operator+=(const Ddg_Expr< B, U, Dim01, Dim23, i_1, j_1, k_1, l_1 > &rhs)
FTensor::Tensor4_Expr< Tensor4< A, Dim0, Dim1, Dim2, Dim3 >, T, Dim0, Dim1, Dim2, Dim3, i, j, k, l >::operator*= auto & operator*=(const U &d)
FTensor::Tensor4_Expr< Tensor4< A, Dim0, Dim1, Dim2, Dim3 >, T, Dim0, Dim1, Dim2, Dim3, i, j, k, l >::equals auto & equals(const Tensor4_Expr< B, U, Dim1_0, Dim1_1, Dim1_2, Dim1_3, i_1, j_1, k_1, l_1 > &rhs)
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Tensor4_Expr< Tensor4< A, Dim0, Dim1, Dim2, Dim3 >, T, Dim0, Dim1, Dim2, Dim3, i, j, k, l >::operator= auto & operator=(const U &d)
FTensor::Index< 'j', 3 > j
FTensor::Tensor4_Expr< Tensor4< A, Dim0, Dim1, Dim2, Dim3 >, T, Dim0, Dim1, Dim2, Dim3, i, j, k, l >::operator= auto & operator=(const Tensor4_Expr< Tensor4< A, Dim0, Dim1, Dim2, Dim3 >, T, Dim0, Dim1, Dim2, Dim3, i, j, k, l > &rhs)
FTensor::Index< 'k', 3 > k
FTensor::Tensor4_Expr< Tensor4< A, Dim0, Dim1, Dim2, Dim3 >, T, Dim0, Dim1, Dim2, Dim3, i, j, k, l >::iter Tensor4< A, Dim0, Dim1, Dim2, Dim3 > & iter
FTensor::Tensor4_Expr< Tensor4< A, Dim0, Dim1, Dim2, Dim3 >, T, Dim0, Dim1, Dim2, Dim3, i, j, k, l >::operator= auto & operator=(const Ddg_Expr< B, U, Dim01, Dim23, i_1, j_1, k_1, l_1 > &rhs)
FTensor::Tensor4_Expr< Tensor4< A, Dim0, Dim1, Dim2, Dim3 >, T, Dim0, Dim1, Dim2, Dim3, i, j, k, l >::operator/= auto & operator/=(const U &d)
FTensor::Index< 'l', 3 > l
Tensor4 times Tensor4 yields Tensor4.