v0.14.0
Public Member Functions | Private Attributes | List of all members
FTensor::Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k > Class Template Reference

#include <src/ftensor/src/FTensor/Tensor3/Tensor3_Expr.hpp>

Collaboration diagram for FTensor::Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k >:
[legend]

Public Member Functions

 Tensor3_Expr (Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > &a)
 
T & operator() (const int N1, const int N2, const int N3)
 
operator() (const int N1, const int N2, const int N3) const
 
template<class B , class U , int Dim1_0, int Dim1_1, int Dim1_2, char i_1, char j_1, char k_1>
auto & equals (const Tensor3_Expr< B, U, Dim1_0, Dim1_1, Dim1_2, i_1, j_1, k_1 > &rhs)
 
template<class B , class U , int Dim1_0, int Dim1_1, int Dim1_2, char i_1, char j_1, char k_1>
auto & operator= (const Tensor3_Expr< B, U, Dim1_0, Dim1_1, Dim1_2, i_1, j_1, k_1 > &rhs)
 
auto & operator= (const Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k > &rhs)
 
template<class U >
Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k > & operator= (const U &u)
 
template<class U >
Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k > & operator*= (const U &u)
 
template<class U >
Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k > & operator/= (const U &u)
 
template<class B , class U , int Dim1_0, int Dim1_1, int Dim1_2, char i_1, char j_1, char k_1>
auto & operator+= (const Tensor3_Expr< B, U, Dim1_0, Dim1_1, Dim1_2, i_1, j_1, k_1 > &rhs)
 
auto & operator+= (const Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k > &rhs)
 
template<class B , class U , int Dim1_0, int Dim1_1, int Dim1_2, char i_1, char j_1, char k_1>
auto & operator-= (const Tensor3_Expr< B, U, Dim1_0, Dim1_1, Dim1_2, i_1, j_1, k_1 > &rhs)
 
auto & operator-= (const Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k > &rhs)
 
template<class B , class U , int Dim1_01, int Dim1_2, char i_1, char j_1, char k_1>
auto & operator= (const Dg_Expr< B, U, Dim1_01, Dim1_2, i_1, j_1, k_1 > &rhs)
 
template<class B , class U , int Dim1_01, int Dim1_2, char i_1, char j_1, char k_1>
auto & operator+= (const Dg_Expr< B, U, Dim1_01, Dim1_2, i_1, j_1, k_1 > &rhs)
 
template<class B , class U , int Dim1_01, int Dim1_2, char i_1, char j_1, char k_1>
auto & operator-= (const Dg_Expr< B, U, Dim1_01, Dim1_2, i_1, j_1, k_1 > &rhs)
 

Private Attributes

Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > & iter
 

Detailed Description

template<class A, class T, int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int Dim0, int Dim1, int Dim2, char i, char j, char k>
class FTensor::Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k >

Definition at line 38 of file Tensor3_Expr.hpp.

Constructor & Destructor Documentation

◆ Tensor3_Expr()

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int Dim0, int Dim1, int Dim2, char i, char j, char k>
FTensor::Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k >::Tensor3_Expr ( Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > &  a)
inline

Definition at line 44 of file Tensor3_Expr.hpp.

45  : iter(a)
46  {}

Member Function Documentation

◆ equals()

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int Dim0, int Dim1, int Dim2, char i, char j, char k>
template<class B , class U , int Dim1_0, int Dim1_1, int Dim1_2, char i_1, char j_1, char k_1>
auto& FTensor::Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k >::equals ( const Tensor3_Expr< B, U, Dim1_0, Dim1_1, Dim1_2, i_1, j_1, k_1 > &  rhs)
inline

Definition at line 63 of file Tensor3_Expr.hpp.

64  {
65  for(int ii = 0; ii < Dim0; ++ii)
66  for(int jj = 0; jj < Dim1; ++jj)
67  for(int kk = 0; kk < Dim2; ++kk)
68  {
69  iter(ii, jj, kk) = permute(*this, rhs, ii, jj, kk);
70  }
71  return *this;
72  }

◆ operator()() [1/2]

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int Dim0, int Dim1, int Dim2, char i, char j, char k>
T& FTensor::Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k >::operator() ( const int  N1,
const int  N2,
const int  N3 
)
inline

Definition at line 47 of file Tensor3_Expr.hpp.

48  {
49  return iter(N1, N2, N3);
50  }

◆ operator()() [2/2]

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int Dim0, int Dim1, int Dim2, char i, char j, char k>
T FTensor::Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k >::operator() ( const int  N1,
const int  N2,
const int  N3 
) const
inline

Definition at line 51 of file Tensor3_Expr.hpp.

52  {
53  return iter(N1, N2, N3);
54  }

◆ operator*=()

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int Dim0, int Dim1, int Dim2, char i, char j, char k>
template<class U >
Tensor3_Expr<Tensor3<A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>, T, Dim0, Dim1, Dim2, i, j, k>& FTensor::Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k >::operator*= ( const U &  u)
inline

Definition at line 106 of file Tensor3_Expr.hpp.

107  {
108  for(int ii = 0; ii < Dim0; ++ii)
109  for(int jj = 0; jj < Dim1; ++jj)
110  for(int kk = 0; kk < Dim2; ++kk)
111  {
112  iter(ii, jj, kk) *= u;
113  }
114  return *this;
115  }

◆ operator+=() [1/3]

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int Dim0, int Dim1, int Dim2, char i, char j, char k>
template<class B , class U , int Dim1_01, int Dim1_2, char i_1, char j_1, char k_1>
auto& FTensor::Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k >::operator+= ( const Dg_Expr< B, U, Dim1_01, Dim1_2, i_1, j_1, k_1 > &  rhs)
inline

Definition at line 192 of file Tensor3_Expr.hpp.

192  {
193 
194  for (int ii = 0; ii < Dim0; ++ii)
195  for (int jj = 0; jj < Dim1; ++jj)
196  for (int kk = 0; kk < Dim2; ++kk) {
197  iter(ii, jj, kk) += permute(*this, rhs, ii, jj, kk);
198  }
199  return *this;
200  }

◆ operator+=() [2/3]

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int Dim0, int Dim1, int Dim2, char i, char j, char k>
template<class B , class U , int Dim1_0, int Dim1_1, int Dim1_2, char i_1, char j_1, char k_1>
auto& FTensor::Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k >::operator+= ( const Tensor3_Expr< B, U, Dim1_0, Dim1_1, Dim1_2, i_1, j_1, k_1 > &  rhs)
inline

Definition at line 133 of file Tensor3_Expr.hpp.

134  {
135  for (int ii = 0; ii < Dim0; ++ii)
136  for (int jj = 0; jj < Dim1; ++jj)
137  for (int kk = 0; kk < Dim2; ++kk) {
138  iter(ii, jj, kk) += permute(*this, rhs, ii, jj, kk);
139  }
140  return *this;
141  }

◆ operator+=() [3/3]

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int Dim0, int Dim1, int Dim2, char i, char j, char k>
auto& FTensor::Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k >::operator+= ( const Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k > &  rhs)
inline

Definition at line 143 of file Tensor3_Expr.hpp.

145  {
146  for (int ii = 0; ii < Dim0; ++ii)
147  for (int jj = 0; jj < Dim1; ++jj)
148  for (int kk = 0; kk < Dim2; ++kk) {
149  iter(ii, jj, kk) += permute(*this, rhs, ii, jj, kk);
150  }
151  return *this;
152  }

◆ operator-=() [1/3]

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int Dim0, int Dim1, int Dim2, char i, char j, char k>
template<class B , class U , int Dim1_01, int Dim1_2, char i_1, char j_1, char k_1>
auto& FTensor::Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k >::operator-= ( const Dg_Expr< B, U, Dim1_01, Dim1_2, i_1, j_1, k_1 > &  rhs)
inline

Definition at line 204 of file Tensor3_Expr.hpp.

204  {
205 
206  for (int ii = 0; ii < Dim0; ++ii)
207  for (int jj = 0; jj < Dim1; ++jj)
208  for (int kk = 0; kk < Dim2; ++kk) {
209  iter(ii, jj, kk) -= permute(*this, rhs, ii, jj, kk);
210  }
211  return *this;
212  }

◆ operator-=() [2/3]

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int Dim0, int Dim1, int Dim2, char i, char j, char k>
template<class B , class U , int Dim1_0, int Dim1_1, int Dim1_2, char i_1, char j_1, char k_1>
auto& FTensor::Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k >::operator-= ( const Tensor3_Expr< B, U, Dim1_0, Dim1_1, Dim1_2, i_1, j_1, k_1 > &  rhs)
inline

Definition at line 156 of file Tensor3_Expr.hpp.

157  {
158 
159  for (int ii = 0; ii < Dim0; ++ii)
160  for (int jj = 0; jj < Dim1; ++jj)
161  for (int kk = 0; kk < Dim2; ++kk) {
162  iter(ii, jj, kk) -= permute(*this, rhs, ii, jj, kk);
163  }
164  return *this;
165  }

◆ operator-=() [3/3]

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int Dim0, int Dim1, int Dim2, char i, char j, char k>
auto& FTensor::Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k >::operator-= ( const Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k > &  rhs)
inline

Definition at line 167 of file Tensor3_Expr.hpp.

169  {
170  for (int ii = 0; ii < Dim0; ++ii)
171  for (int jj = 0; jj < Dim1; ++jj)
172  for (int kk = 0; kk < Dim2; ++kk) {
173  iter(ii, jj, kk) -= permute(*this, rhs, ii, jj, kk);
174  }
175  return *this;
176  }

◆ operator/=()

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int Dim0, int Dim1, int Dim2, char i, char j, char k>
template<class U >
Tensor3_Expr<Tensor3<A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>, T, Dim0, Dim1, Dim2, i, j, k>& FTensor::Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k >::operator/= ( const U &  u)
inline

Definition at line 120 of file Tensor3_Expr.hpp.

121  {
122  for(int ii = 0; ii < Dim0; ++ii)
123  for(int jj = 0; jj < Dim1; ++jj)
124  for(int kk = 0; kk < Dim2; ++kk)
125  {
126  iter(ii, jj, kk) /= u;
127  }
128  return *this;
129  }

◆ operator=() [1/4]

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int Dim0, int Dim1, int Dim2, char i, char j, char k>
template<class B , class U , int Dim1_01, int Dim1_2, char i_1, char j_1, char k_1>
auto& FTensor::Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k >::operator= ( const Dg_Expr< B, U, Dim1_01, Dim1_2, i_1, j_1, k_1 > &  rhs)
inline

Definition at line 180 of file Tensor3_Expr.hpp.

180  {
181 
182  for (int ii = 0; ii < Dim0; ++ii)
183  for (int jj = 0; jj < Dim1; ++jj)
184  for (int kk = 0; kk < Dim2; ++kk) {
185  iter(ii, jj, kk) = permute(*this, rhs, ii, jj, kk);
186  }
187  return *this;
188  }

◆ operator=() [2/4]

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int Dim0, int Dim1, int Dim2, char i, char j, char k>
template<class B , class U , int Dim1_0, int Dim1_1, int Dim1_2, char i_1, char j_1, char k_1>
auto& FTensor::Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k >::operator= ( const Tensor3_Expr< B, U, Dim1_0, Dim1_1, Dim1_2, i_1, j_1, k_1 > &  rhs)
inline

Definition at line 76 of file Tensor3_Expr.hpp.

78  {
79  return equals(rhs);
80  }

◆ operator=() [3/4]

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int Dim0, int Dim1, int Dim2, char i, char j, char k>
auto& FTensor::Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k >::operator= ( const Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k > &  rhs)
inline

Definition at line 82 of file Tensor3_Expr.hpp.

85  {
86  return equals(rhs);
87  }

◆ operator=() [4/4]

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int Dim0, int Dim1, int Dim2, char i, char j, char k>
template<class U >
Tensor3_Expr<Tensor3<A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>, T, Dim0, Dim1, Dim2, i, j, k>& FTensor::Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k >::operator= ( const U &  u)
inline

Definition at line 92 of file Tensor3_Expr.hpp.

93  {
94  for(int ii = 0; ii < Dim0; ++ii)
95  for(int jj = 0; jj < Dim1; ++jj)
96  for(int kk = 0; kk < Dim2; ++kk)
97  {
98  iter(ii, jj, kk) = u;
99  }
100  return *this;
101  }

Member Data Documentation

◆ iter

template<class A , class T , int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2, int Dim0, int Dim1, int Dim2, char i, char j, char k>
Tensor3<A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>& FTensor::Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k >::iter
private

Definition at line 41 of file Tensor3_Expr.hpp.


The documentation for this class was generated from the following file:
FTensor::permute
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)
Definition: permute.hpp:11
a
constexpr double a
Definition: approx_sphere.cpp:30
FTensor::Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k >::iter
Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > & iter
Definition: Tensor3_Expr.hpp:41
FTensor::Tensor3_Expr< Tensor3< A, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 >, T, Dim0, Dim1, Dim2, i, j, k >::equals
auto & equals(const Tensor3_Expr< B, U, Dim1_0, Dim1_1, Dim1_2, i_1, j_1, k_1 > &rhs)
Definition: Tensor3_Expr.hpp:63