v0.14.0
Christof_numeral.hpp
Go to the documentation of this file.
1 /* This is for expressions where an int is used for one slot, and an
2  Index for the others, yielding a Tensor2_symmetric_Expr or
3  Tensor2_Expr. */
4 
5 #pragma once
6 
7 namespace FTensor
8 {
9  template <class A, class T> class Christof_numeral_0
10  {
11  const A iterA;
12  const int N;
13 
14  public:
15  T operator()(const int N1, const int N2) const { return iterA(N, N1, N2); }
16  Christof_numeral_0(const A &a, const int NN) : iterA(a), N(NN) {}
17  };
18 
19  /* We can use this version for when there is an int in either of the
20  last slots, because Christof is symmetric. */
21 
22  template <class A, class T> class Christof_numeral_1
23  {
24  const A iterA;
25  const int N;
26 
27  public:
28  T operator()(const int N1, const int N2) const { return iterA(N1, N, N2); }
29  Christof_numeral_1(const A &a, const int NN) : iterA(a), N(NN) {}
30  };
31 }
FTensor::Christof_numeral_0
Definition: Christof_numeral.hpp:9
FTensor
JSON compatible output.
Definition: Christof_constructor.hpp:6
FTensor::Christof_numeral_0::N
const int N
Definition: Christof_numeral.hpp:12
FTensor::Christof_numeral_0::iterA
const A iterA
Definition: Christof_numeral.hpp:11
FTensor::Christof_numeral_1::N
const int N
Definition: Christof_numeral.hpp:25
FTensor::Christof_numeral_1::iterA
const A iterA
Definition: Christof_numeral.hpp:24
FTensor::Christof_numeral_1::operator()
T operator()(const int N1, const int N2) const
Definition: Christof_numeral.hpp:28
A
constexpr AssemblyType A
Definition: operators_tests.cpp:30
a
constexpr double a
Definition: approx_sphere.cpp:30
FTensor::Christof_numeral_0::operator()
T operator()(const int N1, const int N2) const
Definition: Christof_numeral.hpp:15
FTensor::Christof_numeral_1
Definition: Christof_numeral.hpp:22
FTensor::Christof_numeral_1::Christof_numeral_1
Christof_numeral_1(const A &a, const int NN)
Definition: Christof_numeral.hpp:29
FTensor::Christof_numeral_0::Christof_numeral_0
Christof_numeral_0(const A &a, const int NN)
Definition: Christof_numeral.hpp:16