v0.14.0
Loading...
Searching...
No Matches
Tensor4_numeral.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, Tensor2_Expr or
3 Tensor3_Expr. */
4
5#pragma once
6
7namespace FTensor
8{
9
10 /* Third slot. */
11
12 template <class A, class T> class Tensor4_numeral_2
13 {
15 int N;
16
17 public:
18 T operator()(const int N0, const int N1, const int N2) const {
19 return iterA(N0, N1, N, N2);
20 }
21 Tensor4_numeral_2(const A &a, const int NN) : iterA(a), N(NN) {}
22 };
23
24 /* Forth slot. */
25
26 template <class A, class T> class Tensor4_numeral_3
27 {
29 int N;
30
31 public:
32 T operator()(const int N0, const int N1, const int N2) const {
33 return iterA(N0, N1, N2, N);
34 }
35 Tensor4_numeral_3(const A &a, const int NN) : iterA(a), N(NN) {}
36 };
37
38
39}
static Number< 2 > N2
static Number< 1 > N1
static Number< 0 > N0
constexpr double a
Tensor4_numeral_2(const A &a, const int NN)
T operator()(const int N0, const int N1, const int N2) const
Tensor4_numeral_3(const A &a, const int NN)
T operator()(const int N0, const int N1, const int N2) const
Tensors class implemented by Walter Landry.
Definition FTensor.hpp:51