v0.14.0
Tensor4_number.hpp
Go to the documentation of this file.
1 /* This is for expressions where a number is used for one, two or three
2  slots, and an index for the others, yielding a Tensor1_Expr, Tenors2_Expr or
3  Tensor3_Expr. */
4 
5 #pragma once
6 
7 namespace FTensor
8 {
9 
10  /* Third slot. */
11 
12  template <class A, class T, int N> class Tensor4_number_2
13  {
15 
16  public:
17  T operator()(const int N0, const int N1, const int N3) const {
18  return iterA(N0, N1, N, N3);
19  }
20  Tensor4_number_2(const A &a) : iterA(a) {}
21  };
22 
23  template <class A, class T, int N> class Tensor4_number_rhs_2
24  {};
25 
26  /* Forth slot. */
27 
28  template <class A, class T, int N> class Tensor4_number_3
29  {
31 
32  public:
33  T operator()(const int N0, const int N1, const int N2) const {
34  return iterA(N0, N1, N2, N);
35  }
36  Tensor4_number_3(const A &a) : iterA(a) {}
37  };
38 
39  template <class A, class T, int N> class Tensor4_number_rhs_3
40  {};
41 
42 }
FTensor
JSON compatible output.
Definition: Christof_constructor.hpp:6
FTensor::Tensor4_number_rhs_3
Definition: Tensor4_number.hpp:39
FTensor::Tensor4_number_2::iterA
A iterA
Definition: Tensor4_number.hpp:14
FTensor::Tensor4_number_2
Definition: Tensor4_number.hpp:12
A
constexpr AssemblyType A
Definition: operators_tests.cpp:30
FTensor::Tensor4_number_3
Definition: Tensor4_number.hpp:28
a
constexpr double a
Definition: approx_sphere.cpp:30
FTensor::Tensor4_number_rhs_2
Definition: Tensor4_number.hpp:23
FTensor::Tensor4_number_2::operator()
T operator()(const int N0, const int N1, const int N3) const
Definition: Tensor4_number.hpp:17
FTensor::Tensor4_number_3::operator()
T operator()(const int N0, const int N1, const int N2) const
Definition: Tensor4_number.hpp:33
N
const int N
Definition: speed_test.cpp:3
FTensor::Tensor4_number_3::iterA
A iterA
Definition: Tensor4_number.hpp:30
FTensor::Tensor4_number_3::Tensor4_number_3
Tensor4_number_3(const A &a)
Definition: Tensor4_number.hpp:36
FTensor::Tensor4_number_2::Tensor4_number_2
Tensor4_number_2(const A &a)
Definition: Tensor4_number.hpp:20