v0.10.0
Public Member Functions | List of all members
FTensor::Kronecker_Delta< T > Class Template Reference

Kronecker Delta class. More...

#include <src/ftensor/src/FTensor/Kronecker_Delta.hpp>

Public Member Functions

constexpr T operator() (const int N1, const int N2) const
 
template<char i, char j, int Dim0, int Dim1>
Tensor2_Expr< Kronecker_Delta< T >, T, Dim0, Dim1, i, joperator() (const Index< i, Dim0 > &, const Index< j, Dim1 > &) const
 
template<char i, int Dim0>
constexpr auto operator() (const Index< i, Dim0 > &, const int &N1) const
 
template<char j, int Dim1>
constexpr auto operator() (const int &N0, const Index< j, Dim1 > &) const
 

Detailed Description

template<class T = int>
class FTensor::Kronecker_Delta< T >

Kronecker Delta class.

Template Parameters
int
Examples
EshelbianOperators.cpp, and matrix_function.cpp.

Definition at line 15 of file Kronecker_Delta.hpp.

Member Function Documentation

◆ operator()() [1/4]

template<class T = int>
constexpr T FTensor::Kronecker_Delta< T >::operator() ( const int  N1,
const int  N2 
) const

Definition at line 17 of file Kronecker_Delta.hpp.

17  {
18  return (N1 == N2) ? T(1) : T(0);
19  }
const double T
static Number< 2 > N2
static Number< 1 > N1

◆ operator()() [2/4]

template<class T = int>
template<char i, char j, int Dim0, int Dim1>
Tensor2_Expr<Kronecker_Delta<T>, T, Dim0, Dim1, i, j> FTensor::Kronecker_Delta< T >::operator() ( const Index< i, Dim0 > &  ,
const Index< j, Dim1 > &   
) const

Definition at line 23 of file Kronecker_Delta.hpp.

23  {
24  return Tensor2_Expr<Kronecker_Delta<T>, T, Dim0, Dim1, i, j>(*this);
25  };
const double T
static Index< 'i', 3 > i
static Index< 'j', 3 > j

◆ operator()() [3/4]

template<class T = int>
template<char i, int Dim0>
constexpr auto FTensor::Kronecker_Delta< T >::operator() ( const Index< i, Dim0 > &  ,
const int &  N1 
) const

Definition at line 28 of file Kronecker_Delta.hpp.

28  {
29  auto TensorExpr = [this, N1](const int &N0) {
30  return this->operator()(N0, N1);
31  };
33  };
constexpr T operator()(const int N1, const int N2) const
static Number< 1 > N1
static Number< 0 > N0

◆ operator()() [4/4]

template<class T = int>
template<char j, int Dim1>
constexpr auto FTensor::Kronecker_Delta< T >::operator() ( const int &  N0,
const Index< j, Dim1 > &   
) const

Definition at line 36 of file Kronecker_Delta.hpp.

36  {
37  auto TensorExpr = [this, N0](const int &N1) {
38  return this->operator()(N0, N1);
39  };
40  return Tensor1_Expr<decltype(TensorExpr), T, Dim1, j>{TensorExpr};
41  };
const double T
constexpr T operator()(const int N1, const int N2) const
static Index< 'j', 3 > j
static Number< 1 > N1
static Number< 0 > N0

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