v0.14.0
Tensor2_numeral.hpp
Go to the documentation of this file.
1 /* This is for expressions where a number is used for one slot, and
2  an index for another, yielding a Tensor1_Expr. */
3 
4 #pragma once
5 
6 namespace FTensor
7 {
8  template <class A, class T> class Tensor2_numeral_1
9  {
11  const int N;
12 
13  public:
14  T operator()(const int N1) const { return iterA(N1, N); }
15  Tensor2_numeral_1(A &a, const int NN) : iterA(a), N(NN) {}
16  };
17 
18  template <class A, class T> class Tensor2_numeral_0
19  {
21  const int N;
22 
23  public:
24  T operator()(const int N1) const { return iterA(N, N1); }
25  Tensor2_numeral_0(A &a, const int NN) : iterA(a), N(NN) {}
26  };
27 }
FTensor
JSON compatible output.
Definition: Christof_constructor.hpp:6
FTensor::Tensor2_numeral_1
Definition: Tensor2_numeral.hpp:8
FTensor::Tensor2_numeral_1::N
const int N
Definition: Tensor2_numeral.hpp:11
A
constexpr AssemblyType A
Definition: operators_tests.cpp:30
FTensor::Tensor2_numeral_0::iterA
A iterA
Definition: Tensor2_numeral.hpp:20
FTensor::Tensor2_numeral_1::iterA
A iterA
Definition: Tensor2_numeral.hpp:10
FTensor::Tensor2_numeral_0::N
const int N
Definition: Tensor2_numeral.hpp:21
a
constexpr double a
Definition: approx_sphere.cpp:30
FTensor::Tensor2_numeral_1::operator()
T operator()(const int N1) const
Definition: Tensor2_numeral.hpp:14
FTensor::Tensor2_numeral_1::Tensor2_numeral_1
Tensor2_numeral_1(A &a, const int NN)
Definition: Tensor2_numeral.hpp:15
FTensor::Tensor2_numeral_0::operator()
T operator()(const int N1) const
Definition: Tensor2_numeral.hpp:24
FTensor::Tensor2_numeral_0::Tensor2_numeral_0
Tensor2_numeral_0(A &a, const int NN)
Definition: Tensor2_numeral.hpp:25
FTensor::Tensor2_numeral_0
Definition: Tensor2_numeral.hpp:18