v0.8.13
Public Member Functions | Private Attributes | List of all members
FTensor::Ddg< T, Tensor_Dim01, Tensor_Dim23 > Class Template Reference

#include <src/ftensor/src/FTensor/Ddg/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>
std::enable_if<(Tensor_Dim01 >=Dim01 &&Tensor_Dim23 >=Dim23), Ddg_Expr< Ddg< T, Tensor_Dim01, Tensor_Dim23 >, T, Dim01, Dim23, i, j, k, l > >::type 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>
std::enable_if<(Tensor_Dim01 >=Dim01 &&Tensor_Dim23 >=Dim23), Ddg_Expr< const Ddg< T, Tensor_Dim01, Tensor_Dim23 >, T, Dim01, Dim23, i, j, k, l > >::type 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>
std::enable_if<(Tensor_Dim01 > N0 &&Tensor_Dim01 > N1 &&Tensor_Dim23 >=Dim), Tensor2_symmetric_Expr< Ddg_number_01< const Ddg< T, Tensor_Dim01, Tensor_Dim23 >, T, N0, N1 >, T, Dim, i, j > >::type 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>
std::enable_if<(Tensor_Dim01 > N0 &&Tensor_Dim01 > N1 &&Tensor_Dim23 >=Dim), Tensor2_symmetric_Expr< Ddg_number_rhs_01< Ddg< T, Tensor_Dim01, Tensor_Dim23 >, T, N0, N1 >, T, Dim, i, j > >::type 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>
std::enable_if<(Tensor_Dim01 > N0 &&Tensor_Dim01 >=Dim1 &&Tensor_Dim23 >=Dim23), Dg_Expr< Ddg_number_0< const Ddg< T, Tensor_Dim01, Tensor_Dim23 >, T, N0 >, T, Dim23, Dim1, i, j, k > >::type 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>
std::enable_if<(Tensor_Dim01 > N0 &&Tensor_Dim01 >=Dim1 &&Tensor_Dim23 >=Dim23), Dg_Expr< Ddg_number_rhs_0< Ddg< T, Tensor_Dim01, Tensor_Dim23 >, T, N0 >, T, Dim23, Dim1, i, j, k > >::type operator() (const Number< N0 >, const Index< k, Dim1 >, const Index< i, Dim23 >, const Index< j, Dim23 >)
 
template<char i, char j, int Dim>
std::enable_if<(Tensor_Dim23 >=Dim), Tensor2_symmetric_Expr< Ddg_numeral_01< const Ddg< T, Tensor_Dim01, Tensor_Dim23 >, T >, T, Dim, i, j > >::type operator() (const int N0, const int N1, const Index< i, Dim >, const Index< j, Dim >) const
 
template<char i, char j, int Dim>
std::enable_if<(Tensor_Dim01 >=Dim), Tensor2_symmetric_Expr< Ddg_numeral_23< const Ddg< T, Tensor_Dim01, Tensor_Dim23 >, T >, T, Dim, i, j > >::type 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>
std::enable_if<(Tensor_Dim01 >=Dim1 &&Tensor_Dim23 >=Dim3), Tensor2_Expr< Ddg_numeral_02< const Ddg< T, Tensor_Dim01, Tensor_Dim23 >, T >, T, Dim1, Dim3, i, j > >::type operator() (const int N0, const Index< i, Dim1 >, const int N2, const Index< j, Dim3 >) const
 
template<char i, int Dim>
std::enable_if<(Tensor_Dim01 >=Dim), Tensor1_Expr< Ddg_numeral_123< const Ddg< T, Tensor_Dim01, Tensor_Dim23 >, T >, T, Dim, i > >::type operator() (const Index< i, Dim >, const int N1, const int N2, const int N3)
 
template<char i, int Dim>
std::enable_if<(Tensor_Dim01 >=Dim), Tensor1_Expr< Ddg_numeral_123< const Ddg< T, Tensor_Dim01, Tensor_Dim23 >, T >, T, Dim, i > >::type 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>
std::enable_if<(Tensor_Dim01 >=Dim1 &&Tensor_Dim23 >=Dim23), Dg_Expr< Ddg_numeral_0< const Ddg< T, Tensor_Dim01, Tensor_Dim23 >, T >, T, Dim23, Dim1, i, j, k > >::type 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 FTensor::Ddg< T, Tensor_Dim01, Tensor_Dim23 >

Definition at line 7 of file Ddg_value.hpp.

Member Function Documentation

◆ operator()() [1/14]

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

Definition at line 17 of file Ddg_value.hpp.

18  {
19 #ifdef FTENSOR_DEBUG
20  if(N1 >= Tensor_Dim01 || N1 < 0 || N2 >= Tensor_Dim01 || N2 < 0
21  || N3 >= Tensor_Dim23 || N3 < 0 || N4 >= Tensor_Dim23 || N4 < 0)
22  {
23  std::stringstream s;
24  s << "Bad index in Dg<T," << Tensor_Dim01 << "," << Tensor_Dim23
25  << ">.operator(" << N1 << "," << N2 << "," << N3 << "," << N4
26  << ")" << std::endl;
27  throw std::out_of_range(s.str());
28  }
29 #endif
30  return N1 > N2
31  ? (N3 > N4 ? data[N1 + (N2 * (2 * Tensor_Dim01 - N2 - 1)) / 2]
32  [N3 + (N4 * (2 * Tensor_Dim23 - N4 - 1)) / 2]
33  : data[N1 + (N2 * (2 * Tensor_Dim01 - N2 - 1)) / 2]
34  [N4 + (N3 * (2 * Tensor_Dim23 - N3 - 1)) / 2])
35  : (N3 > N4 ? data[N2 + (N1 * (2 * Tensor_Dim01 - N1 - 1)) / 2]
36  [N3 + (N4 * (2 * Tensor_Dim23 - N4 - 1)) / 2]
37  : data[N2 + (N1 * (2 * Tensor_Dim01 - N1 - 1)) / 2]
38  [N4 + (N3 * (2 * Tensor_Dim23 - N3 - 1)) / 2]);
39  }
T data[(Tensor_Dim01 *(Tensor_Dim01+1))/2][(Tensor_Dim23 *(Tensor_Dim23+1))/2]
Definition: Ddg_value.hpp:10

◆ operator()() [2/14]

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

Definition at line 41 of file Ddg_value.hpp.

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

◆ 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>
std::enable_if<(Tensor_Dim01 >= Dim01 && Tensor_Dim23 >= Dim23), Ddg_Expr<Ddg<T, Tensor_Dim01, Tensor_Dim23>, T, Dim01, Dim23, i, j, k, l> >::type FTensor::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 74 of file Ddg_value.hpp.

76  {
77  return Ddg_Expr<Ddg<T, Tensor_Dim01, Tensor_Dim23>, T, Dim01, Dim23, i,
78  j, k, l>(*this);
79  }

◆ 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>
std::enable_if<(Tensor_Dim01 >= Dim01 && Tensor_Dim23 >= Dim23), Ddg_Expr<const Ddg<T, Tensor_Dim01, Tensor_Dim23>, T, Dim01, Dim23, i, j, k, l> >::type FTensor::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 85 of file Ddg_value.hpp.

87  {
88  return Ddg_Expr<const Ddg<T, Tensor_Dim01, Tensor_Dim23>, T, Dim01,
89  Dim23, i, j, k, l>(*this);
90  }

◆ operator()() [5/14]

template<class T, int Tensor_Dim01, int Tensor_Dim23>
template<char i, char j, int N0, int N1, int Dim>
std::enable_if< (Tensor_Dim01 > N0 && Tensor_Dim01 > N1 && Tensor_Dim23 >= Dim), Tensor2_symmetric_Expr< Ddg_number_01<const Ddg<T, Tensor_Dim01, Tensor_Dim23>, T, N0, N1>, T, Dim, i, j> >::type FTensor::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 101 of file Ddg_value.hpp.

103  {
104  using TensorExpr
105  = Ddg_number_01<const Ddg<T, Tensor_Dim01, Tensor_Dim23>, T, N0, N1>;
106  return Tensor2_symmetric_Expr<TensorExpr, T, Dim, i, j>(
107  TensorExpr(*this));
108  }

◆ operator()() [6/14]

template<class T, int Tensor_Dim01, int Tensor_Dim23>
template<char i, char j, int N0, int N1, int Dim>
std::enable_if< (Tensor_Dim01 > N0 && Tensor_Dim01 > N1 && Tensor_Dim23 >= Dim), Tensor2_symmetric_Expr< Ddg_number_rhs_01<Ddg<T, Tensor_Dim01, Tensor_Dim23>, T, N0, N1>, T, Dim, i, j> >::type FTensor::Ddg< T, Tensor_Dim01, Tensor_Dim23 >::operator() ( const Number< N0 >  ,
const Number< N1 >  ,
const Index< i, Dim >  ,
const Index< j, Dim >   
)

Definition at line 116 of file Ddg_value.hpp.

118  {
119  using TensorExpr
120  = Ddg_number_rhs_01<Ddg<T, Tensor_Dim01, Tensor_Dim23>, T, N0, N1>;
121  return Tensor2_symmetric_Expr<TensorExpr, T, Dim, i, j>(*this);
122  }

◆ 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>
std::enable_if< (Tensor_Dim01 > N0 && Tensor_Dim01 >= Dim1 && Tensor_Dim23 >= Dim23), Dg_Expr<Ddg_number_0<const Ddg<T, Tensor_Dim01, Tensor_Dim23>, T, N0>, T, Dim23, Dim1, i, j, k> >::type FTensor::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 132 of file Ddg_value.hpp.

134  {
135  using TensorExpr
136  = Ddg_number_0<const Ddg<T, Tensor_Dim01, Tensor_Dim23>, T, N0>;
137  return Dg_Expr<TensorExpr, T, Dim23, Dim1, i, j, k>(TensorExpr(*this));
138  }

◆ 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>
std::enable_if< (Tensor_Dim01 > N0 && Tensor_Dim01 >= Dim1 && Tensor_Dim23 >= Dim23), Dg_Expr<Ddg_number_rhs_0<Ddg<T, Tensor_Dim01, Tensor_Dim23>, T, N0>, T, Dim23, Dim1, i, j, k> >::type FTensor::Ddg< T, Tensor_Dim01, Tensor_Dim23 >::operator() ( const Number< N0 >  ,
const Index< k, Dim1 >  ,
const Index< i, Dim23 >  ,
const Index< j, Dim23 >   
)

Definition at line 145 of file Ddg_value.hpp.

147  {
148  using TensorExpr
149  = Ddg_number_rhs_0<Ddg<T, Tensor_Dim01, Tensor_Dim23>, T, N0>;
150  return Dg_Expr<TensorExpr, T, Dim23, Dim1, i, j, k>(*this);
151  }

◆ operator()() [9/14]

template<class T, int Tensor_Dim01, int Tensor_Dim23>
template<char i, char j, int Dim>
std::enable_if< (Tensor_Dim23 >= Dim), Tensor2_symmetric_Expr< Ddg_numeral_01<const Ddg<T, Tensor_Dim01, Tensor_Dim23>, T>, T, Dim, i, j> >::type FTensor::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 163 of file Ddg_value.hpp.

165  {
166  using TensorExpr
167  = Ddg_numeral_01<const Ddg<T, Tensor_Dim01, Tensor_Dim23>, T>;
168  return Tensor2_symmetric_Expr<TensorExpr, T, Dim, i, j>(
169  TensorExpr(*this, N0, N1));
170  }

◆ operator()() [10/14]

template<class T, int Tensor_Dim01, int Tensor_Dim23>
template<char i, char j, int Dim>
std::enable_if< (Tensor_Dim01 >= Dim), Tensor2_symmetric_Expr< Ddg_numeral_23<const Ddg<T, Tensor_Dim01, Tensor_Dim23>, T>, T, Dim, i, j> >::type FTensor::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 178 of file Ddg_value.hpp.

180  {
181  using TensorExpr
182  = Ddg_numeral_23<const Ddg<T, Tensor_Dim01, Tensor_Dim23>, T>;
183  return Tensor2_symmetric_Expr<TensorExpr, T, Dim, i, j>(
184  TensorExpr(*this, N2, N3));
185  }

◆ operator()() [11/14]

template<class T, int Tensor_Dim01, int Tensor_Dim23>
template<char i, char j, int Dim1, int Dim3>
std::enable_if< (Tensor_Dim01 >= Dim1 && Tensor_Dim23 >= Dim3), Tensor2_Expr<Ddg_numeral_02<const Ddg<T, Tensor_Dim01, Tensor_Dim23>, T>, T, Dim1, Dim3, i, j> >::type FTensor::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 194 of file Ddg_value.hpp.

196  {
197  using TensorExpr
198  = Ddg_numeral_02<const Ddg<T, Tensor_Dim01, Tensor_Dim23>, T>;
199  return Tensor2_Expr<TensorExpr, T, Dim1, Dim3, i, j>(
200  TensorExpr(*this, N0, N2));
201  }

◆ operator()() [12/14]

template<class T, int Tensor_Dim01, int Tensor_Dim23>
template<char i, int Dim>
std::enable_if< (Tensor_Dim01 >= Dim), Tensor1_Expr<Ddg_numeral_123<const Ddg<T, Tensor_Dim01, Tensor_Dim23>, T>, T, Dim, i> >::type FTensor::Ddg< T, Tensor_Dim01, Tensor_Dim23 >::operator() ( const Index< i, Dim >  ,
const int  N1,
const int  N2,
const int  N3 
)

Definition at line 210 of file Ddg_value.hpp.

211  {
212  using TensorExpr
213  = Ddg_numeral_123<const Ddg<T, Tensor_Dim01, Tensor_Dim23>, T>;
215  TensorExpr(*this, N1, N2, N3));
216  }

◆ operator()() [13/14]

template<class T, int Tensor_Dim01, int Tensor_Dim23>
template<char i, int Dim>
std::enable_if< (Tensor_Dim01 >= Dim), Tensor1_Expr<Ddg_numeral_123<const Ddg<T, Tensor_Dim01, Tensor_Dim23>, T>, T, Dim, i> >::type FTensor::Ddg< T, Tensor_Dim01, Tensor_Dim23 >::operator() ( const int  N1,
const Index< i, Dim >  ,
const int  N2,
const int  N3 
)

Definition at line 223 of file Ddg_value.hpp.

224  {
225  using TensorExpr
226  = Ddg_numeral_123<const Ddg<T, Tensor_Dim01, Tensor_Dim23>, T>;
228  TensorExpr(*this, N1, N2, N3));
229  }

◆ operator()() [14/14]

template<class T, int Tensor_Dim01, int Tensor_Dim23>
template<char i, char j, char k, int Dim1, int Dim23>
std::enable_if< (Tensor_Dim01 >= Dim1 && Tensor_Dim23 >= Dim23), Dg_Expr<Ddg_numeral_0<const Ddg<T, Tensor_Dim01, Tensor_Dim23>, T>, T, Dim23, Dim1, i, j, k> >::type FTensor::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 240 of file Ddg_value.hpp.

242  {
243  using TensorExpr
244  = Ddg_numeral_0<const Ddg<T, Tensor_Dim01, Tensor_Dim23>, T>;
245  return Dg_Expr<TensorExpr, T, Dim23, Dim1, i, j, k>(
246  TensorExpr(*this, N0));
247  }

Member Data Documentation

◆ data

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

Definition at line 10 of file Ddg_value.hpp.


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