v0.6.10
Public Member Functions | Private Attributes | List of all members
Tensor4_ddg< T, Tensor_Dim01, Tensor_Dim23 > Class Template Reference

#include <src/ftensor/src/FTensor/Tensor4_ddg/Tensor4_ddg_value.hpp>

Public Member Functions

T & operator() (const int N1, const int N2, const int N3, const int N4)
 
operator() (const int N1, const int N2, const int N3, const int N4) const
 
template<char i, char j, char k, char l, int Dim01, int Dim23>
Tensor4_ddg_Expr< Tensor4_ddg< T, Tensor_Dim01, Tensor_Dim23 >, T, Dim01, Dim23, i, j, k, l > operator() (const Index< i, Dim01 >, const Index< j, Dim01 >, const Index< k, Dim23 >, const Index< l, Dim23 >)
 
template<char i, char j, char k, char l, int Dim01, int Dim23>
const Tensor4_ddg_Expr< const Tensor4_ddg< T, Tensor_Dim01, Tensor_Dim23 >, T, Dim01, Dim23, i, j, k, l > operator() (const Index< i, Dim01 >, const Index< j, Dim01 >, const Index< k, Dim23 >, const Index< l, Dim23 >) const
 
template<char i, char j, int N0, int N1, int Dim>
const Tensor2_symmetric_Expr< const Tensor4_ddg_number_01< const Tensor4_ddg< T, Tensor_Dim01, Tensor_Dim23 >, T, N0, N1 >, T, Dim, i, j > operator() (const Number< N0 >, const Number< N1 >, const Index< i, Dim >, const Index< j, Dim >) const
 
template<char i, char j, int N0, int N1, int Dim>
Tensor2_symmetric_Expr< Tensor4_ddg_number_rhs_01< Tensor4_ddg< T, Tensor_Dim01, Tensor_Dim23 >, T, N0, N1 >, T, Dim, i, j > operator() (const Number< N0 >, const Number< N1 >, const Index< i, Dim >, const Index< j, Dim >)
 
template<char i, char j, char k, int N0, int Dim1, int Dim23>
const Tensor3_dg_Expr< const Tensor4_ddg_number_0< const Tensor4_ddg< T, Tensor_Dim01, Tensor_Dim23 >, T, N0 >, T, Dim23, Dim1, i, j, k > operator() (const Number< N0 >, const Index< k, Dim1 >, const Index< i, Dim23 >, const Index< j, Dim23 >) const
 
template<char i, char j, char k, int N0, int Dim1, int Dim23>
Tensor3_dg_Expr< Tensor4_ddg_number_rhs_0< Tensor4_ddg< T, Tensor_Dim01, Tensor_Dim23 >, T, N0 >, T, Dim23, Dim1, i, j, k > operator() (const Number< N0 >, const Index< k, Dim1 >, const Index< i, Dim23 >, const Index< j, Dim23 >)
 
template<char i, char j, int Dim>
const Tensor2_symmetric_Expr< const Tensor4_ddg_numeral_01< const Tensor4_ddg< T, Tensor_Dim01, Tensor_Dim23 >, T >, T, Dim, i, j > operator() (const int N0, const int N1, const Index< i, Dim >, const Index< j, Dim >) const
 
template<char i, char j, int Dim>
const Tensor2_symmetric_Expr< const Tensor4_ddg_numeral_23< const Tensor4_ddg< T, Tensor_Dim01, Tensor_Dim23 >, T >, T, Dim, i, j > operator() (const Index< i, Dim >, const Index< j, Dim >, const int N2, const int N3) const
 
template<char i, char j, int Dim1, int Dim3>
const Tensor2_Expr< const Tensor4_ddg_numeral_02< const Tensor4_ddg< T, Tensor_Dim01, Tensor_Dim23 >, T >, T, Dim1, Dim3, i, j > operator() (const int N0, const Index< i, Dim1 >, const int N2, const Index< j, Dim3 >) const
 
template<char i, int Dim>
const Tensor1_Expr< const Tensor4_ddg_numeral_123< const Tensor4_ddg< T, Tensor_Dim01, Tensor_Dim23 >, T >, T, Dim, i > operator() (const Index< i, Dim >, const int N1, const int N2, const int N3)
 
template<char i, int Dim>
const Tensor1_Expr< const Tensor4_ddg_numeral_123< const Tensor4_ddg< T, Tensor_Dim01, Tensor_Dim23 >, T >, T, Dim, i > operator() (const int N1, const Index< i, Dim >, const int N2, const int N3)
 
template<char i, char j, char k, int Dim1, int Dim23>
const Tensor3_dg_Expr< const Tensor4_ddg_numeral_0< const Tensor4_ddg< T, Tensor_Dim01, Tensor_Dim23 >, T >, T, Dim23, Dim1, i, j, k > operator() (const int N0, const Index< k, Dim1 >, const Index< i, Dim23 >, const Index< j, Dim23 >) const
 

Private Attributes

data [(Tensor_Dim01 *(Tensor_Dim01+1))/2][(Tensor_Dim23 *(Tensor_Dim23+1))/2]
 

Detailed Description

template<class T, int Tensor_Dim01, int Tensor_Dim23>
class Tensor4_ddg< T, Tensor_Dim01, Tensor_Dim23 >

Definition at line 4 of file Tensor4_ddg_value.hpp.

Member Function Documentation

◆ operator()() [1/14]

template<class T, int Tensor_Dim01, int Tensor_Dim23>
T& Tensor4_ddg< T, Tensor_Dim01, Tensor_Dim23 >::operator() ( const int  N1,
const int  N2,
const int  N3,
const int  N4 
)

Definition at line 12 of file Tensor4_ddg_value.hpp.

13  {
14 #ifdef FTENSOR_DEBUG
15  if(N1>=Tensor_Dim01 || N1<0 || N2>=Tensor_Dim01 || N2<0
16  || N3>=Tensor_Dim23 || N3<0 || N4>=Tensor_Dim23 || N4<0)
17  {
18  std::stringstream s;
19  s << "Bad index in Tensor3_dg<T,"
20  << Tensor_Dim01 << "," << Tensor_Dim23
21  << ">.operator("
22  << N1 << "," << N2 << "," << N3 << "," << N4 << ")"
23  << std::endl;
24  throw std::runtime_error(s.str());
25  }
26 #endif
27  return N1>N2 ? (N3>N4 ? data[N1+(N2*(2*Tensor_Dim01-N2-1))/2]
28  [N3+(N4*(2*Tensor_Dim23-N4-1))/2]
29  : data[N1+(N2*(2*Tensor_Dim01-N2-1))/2]
30  [N4+(N3*(2*Tensor_Dim23-N3-1))/2])
31  : (N3>N4 ? data[N2+(N1*(2*Tensor_Dim01-N1-1))/2]
32  [N3+(N4*(2*Tensor_Dim23-N4-1))/2]
33  : data[N2+(N1*(2*Tensor_Dim01-N1-1))/2]
34  [N4+(N3*(2*Tensor_Dim23-N3-1))/2]);
35  }
T data[(Tensor_Dim01 *(Tensor_Dim01+1))/2][(Tensor_Dim23 *(Tensor_Dim23+1))/2]

◆ operator()() [2/14]

template<class T, int Tensor_Dim01, int Tensor_Dim23>
T Tensor4_ddg< T, Tensor_Dim01, Tensor_Dim23 >::operator() ( const int  N1,
const int  N2,
const int  N3,
const int  N4 
) const

Definition at line 37 of file Tensor4_ddg_value.hpp.

39  {
40 #ifdef FTENSOR_DEBUG
41  if(N1>=Tensor_Dim01 || N1<0 || N2>=Tensor_Dim01 || N2<0
42  || N3>=Tensor_Dim23 || N3<0 || N4>=Tensor_Dim23 || N4<0)
43  {
44  std::stringstream s;
45  s << "Bad index in Tensor3_dg<T,"
46  << Tensor_Dim01 << "," << Tensor_Dim23
47  << ">.operator("
48  << N1 << "," << N2 << "," << N3 << "," << N4
49  << ") const"
50  << std::endl;
51  throw std::runtime_error(s.str());
52  }
53 #endif
54  return N1>N2 ? (N3>N4 ? data[N1+(N2*(2*Tensor_Dim01-N2-1))/2]
55  [N3+(N4*(2*Tensor_Dim23-N4-1))/2]
56  : data[N1+(N2*(2*Tensor_Dim01-N2-1))/2]
57  [N4+(N3*(2*Tensor_Dim23-N3-1))/2])
58  : (N3>N4 ? data[N2+(N1*(2*Tensor_Dim01-N1-1))/2]
59  [N3+(N4*(2*Tensor_Dim23-N4-1))/2]
60  : data[N2+(N1*(2*Tensor_Dim01-N1-1))/2]
61  [N4+(N3*(2*Tensor_Dim23-N3-1))/2]);
62  }
T data[(Tensor_Dim01 *(Tensor_Dim01+1))/2][(Tensor_Dim23 *(Tensor_Dim23+1))/2]

◆ operator()() [3/14]

template<class T, int Tensor_Dim01, int Tensor_Dim23>
template<char i, char j, char k, char l, int Dim01, int Dim23>
Tensor4_ddg_Expr<Tensor4_ddg<T,Tensor_Dim01,Tensor_Dim23>, T,Dim01,Dim23,i,j,k,l> Tensor4_ddg< T, Tensor_Dim01, Tensor_Dim23 >::operator() ( const Index< i, Dim01 >  ,
const Index< j, Dim01 >  ,
const Index< k, Dim23 >  ,
const Index< l, Dim23 >   
)

Definition at line 72 of file Tensor4_ddg_value.hpp.

74  {
76  T,Dim01,Dim23,i,j,k,l> (*this);
77  }

◆ operator()() [4/14]

template<class T, int Tensor_Dim01, int Tensor_Dim23>
template<char i, char j, char k, char l, int Dim01, int Dim23>
const Tensor4_ddg_Expr<const Tensor4_ddg<T,Tensor_Dim01,Tensor_Dim23>, T,Dim01,Dim23,i,j,k,l> Tensor4_ddg< T, Tensor_Dim01, Tensor_Dim23 >::operator() ( const Index< i, Dim01 >  ,
const Index< j, Dim01 >  ,
const Index< k, Dim23 >  ,
const Index< l, Dim23 >   
) const

Definition at line 83 of file Tensor4_ddg_value.hpp.

85  {
87  T,Dim01,Dim23,i,j,k,l> (*this);
88  }

◆ operator()() [5/14]

template<class T, int Tensor_Dim01, int Tensor_Dim23>
template<char i, char j, int N0, int N1, int Dim>
const Tensor2_symmetric_Expr<const Tensor4_ddg_number_01 <const Tensor4_ddg<T,Tensor_Dim01,Tensor_Dim23>,T,N0,N1>,T,Dim,i,j> Tensor4_ddg< T, Tensor_Dim01, Tensor_Dim23 >::operator() ( const Number< N0 >  ,
const Number< N1 >  ,
const Index< i, Dim >  ,
const Index< j, Dim >   
) const

Definition at line 96 of file Tensor4_ddg_value.hpp.

98  {
99  typedef const Tensor4_ddg_number_01<const Tensor4_ddg
100  <T,Tensor_Dim01,Tensor_Dim23>,T,N0,N1> TensorExpr;
101  return Tensor2_symmetric_Expr<TensorExpr,T,Dim,i,j>(TensorExpr(*this));
102  }

◆ operator()() [6/14]

template<class T, int Tensor_Dim01, int Tensor_Dim23>
template<char i, char j, int N0, int N1, int Dim>
Tensor2_symmetric_Expr<Tensor4_ddg_number_rhs_01 <Tensor4_ddg<T,Tensor_Dim01,Tensor_Dim23>,T,N0,N1>,T,Dim,i,j> Tensor4_ddg< T, Tensor_Dim01, Tensor_Dim23 >::operator() ( const Number< N0 >  ,
const Number< N1 >  ,
const Index< i, Dim >  ,
const Index< j, Dim >   
)

◆ operator()() [7/14]

template<class T, int Tensor_Dim01, int Tensor_Dim23>
template<char i, char j, char k, int N0, int Dim1, int Dim23>
const Tensor3_dg_Expr<const Tensor4_ddg_number_0 <const Tensor4_ddg<T,Tensor_Dim01,Tensor_Dim23>,T,N0>,T,Dim23,Dim1,i,j,k> Tensor4_ddg< T, Tensor_Dim01, Tensor_Dim23 >::operator() ( const Number< N0 >  ,
const Index< k, Dim1 >  ,
const Index< i, Dim23 >  ,
const Index< j, Dim23 >   
) const

Definition at line 121 of file Tensor4_ddg_value.hpp.

123  {
124  typedef const Tensor4_ddg_number_0<const Tensor4_ddg
125  <T,Tensor_Dim01,Tensor_Dim23>,T,N0> TensorExpr;
126  return Tensor3_dg_Expr<TensorExpr,T,Dim23,Dim1,i,j,k>(TensorExpr(*this));
127  }

◆ operator()() [8/14]

template<class T, int Tensor_Dim01, int Tensor_Dim23>
template<char i, char j, char k, int N0, int Dim1, int Dim23>
Tensor3_dg_Expr<Tensor4_ddg_number_rhs_0 <Tensor4_ddg<T,Tensor_Dim01,Tensor_Dim23>,T,N0>,T,Dim23,Dim1,i,j,k> Tensor4_ddg< T, Tensor_Dim01, Tensor_Dim23 >::operator() ( const Number< N0 >  ,
const Index< k, Dim1 >  ,
const Index< i, Dim23 >  ,
const Index< j, Dim23 >   
)

◆ operator()() [9/14]

template<class T, int Tensor_Dim01, int Tensor_Dim23>
template<char i, char j, int Dim>
const Tensor2_symmetric_Expr<const Tensor4_ddg_numeral_01 <const Tensor4_ddg<T,Tensor_Dim01,Tensor_Dim23>,T>,T,Dim,i,j> Tensor4_ddg< T, Tensor_Dim01, Tensor_Dim23 >::operator() ( const int  N0,
const int  N1,
const Index< i, Dim >  ,
const Index< j, Dim >   
) const

Definition at line 147 of file Tensor4_ddg_value.hpp.

149  {
150  typedef const Tensor4_ddg_numeral_01<const Tensor4_ddg
151  <T,Tensor_Dim01,Tensor_Dim23>,T> TensorExpr;
153  (TensorExpr(*this,N0,N1));
154  }

◆ operator()() [10/14]

template<class T, int Tensor_Dim01, int Tensor_Dim23>
template<char i, char j, int Dim>
const Tensor2_symmetric_Expr<const Tensor4_ddg_numeral_23 <const Tensor4_ddg<T,Tensor_Dim01,Tensor_Dim23>,T>,T,Dim,i,j> Tensor4_ddg< T, Tensor_Dim01, Tensor_Dim23 >::operator() ( const Index< i, Dim >  ,
const Index< j, Dim >  ,
const int  N2,
const int  N3 
) const

Definition at line 159 of file Tensor4_ddg_value.hpp.

161  {
162  typedef const Tensor4_ddg_numeral_23<const Tensor4_ddg
163  <T,Tensor_Dim01,Tensor_Dim23>,T> TensorExpr;
165  (TensorExpr(*this,N2,N3));
166  }

◆ operator()() [11/14]

template<class T, int Tensor_Dim01, int Tensor_Dim23>
template<char i, char j, int Dim1, int Dim3>
const Tensor2_Expr<const Tensor4_ddg_numeral_02 <const Tensor4_ddg<T,Tensor_Dim01,Tensor_Dim23>,T>,T,Dim1,Dim3,i,j> Tensor4_ddg< T, Tensor_Dim01, Tensor_Dim23 >::operator() ( const int  N0,
const Index< i, Dim1 >  ,
const int  N2,
const Index< j, Dim3 >   
) const

Definition at line 173 of file Tensor4_ddg_value.hpp.

175  {
176  typedef const Tensor4_ddg_numeral_02<const Tensor4_ddg
177  <T,Tensor_Dim01,Tensor_Dim23>,T> TensorExpr;
179  (TensorExpr(*this,N0,N2));
180  }

◆ operator()() [12/14]

template<class T, int Tensor_Dim01, int Tensor_Dim23>
template<char i, int Dim>
const Tensor1_Expr<const Tensor4_ddg_numeral_123<const Tensor4_ddg <T,Tensor_Dim01,Tensor_Dim23>,T>,T,Dim,i> Tensor4_ddg< T, Tensor_Dim01, Tensor_Dim23 >::operator() ( const Index< i, Dim >  ,
const int  N1,
const int  N2,
const int  N3 
)

Definition at line 187 of file Tensor4_ddg_value.hpp.

189  {
190  typedef const Tensor4_ddg_numeral_123<const Tensor4_ddg
191  <T,Tensor_Dim01,Tensor_Dim23>,T> TensorExpr;
192  return Tensor1_Expr<TensorExpr,T,Dim,i>(TensorExpr(*this,N1,N2,N3));
193  }

◆ operator()() [13/14]

template<class T, int Tensor_Dim01, int Tensor_Dim23>
template<char i, int Dim>
const Tensor1_Expr<const Tensor4_ddg_numeral_123<const Tensor4_ddg <T,Tensor_Dim01,Tensor_Dim23>,T>,T,Dim,i> Tensor4_ddg< T, Tensor_Dim01, Tensor_Dim23 >::operator() ( const int  N1,
const Index< i, Dim >  ,
const int  N2,
const int  N3 
)

Definition at line 198 of file Tensor4_ddg_value.hpp.

200  {
201  typedef const Tensor4_ddg_numeral_123<const Tensor4_ddg
202  <T,Tensor_Dim01,Tensor_Dim23>,T> TensorExpr;
203  return Tensor1_Expr<TensorExpr,T,Dim,i>(TensorExpr(*this,N1,N2,N3));
204  }

◆ operator()() [14/14]

template<class T, int Tensor_Dim01, int Tensor_Dim23>
template<char i, char j, char k, int Dim1, int Dim23>
const Tensor3_dg_Expr<const Tensor4_ddg_numeral_0 <const Tensor4_ddg<T,Tensor_Dim01,Tensor_Dim23>,T>,T,Dim23,Dim1,i,j,k> Tensor4_ddg< T, Tensor_Dim01, Tensor_Dim23 >::operator() ( const int  N0,
const Index< k, Dim1 >  ,
const Index< i, Dim23 >  ,
const Index< j, Dim23 >   
) const

Definition at line 213 of file Tensor4_ddg_value.hpp.

215  {
216  typedef const Tensor4_ddg_numeral_0<const Tensor4_ddg
217  <T,Tensor_Dim01,Tensor_Dim23>,T> TensorExpr;
219  (TensorExpr(*this,N0));
220  }

Member Data Documentation

◆ data

template<class T, int Tensor_Dim01, int Tensor_Dim23>
T Tensor4_ddg< T, Tensor_Dim01, Tensor_Dim23 >::data[(Tensor_Dim01 *(Tensor_Dim01+1))/2][(Tensor_Dim23 *(Tensor_Dim23+1))/2]
private

Definition at line 6 of file Tensor4_ddg_value.hpp.


The documentation for this class was generated from the following file: