TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
Loading...
Searching...
No Matches
kronecker.hpp
#include <nda/clef.hpp>
#include <type_traits>

Detailed Description

Kronecker delta \( \delta_{ij} \) for arithmetic types, with a CLEF lazy-expression hook.

Definition in file kronecker.hpp.

Go to the source code of this file.

Functions

template<typename T1, typename T2>
requires (std::is_arithmetic_v<T1> and std::is_arithmetic_v<T2>)
bool nda::clef::kronecker (T1 i, T2 j)
 Kronecker delta \( \delta_{ij} \).
template<typename T1, typename T2>
requires (std::is_arithmetic_v<T1> and std::is_arithmetic_v<T2>)
bool triqs::utility::kronecker (T1 i, T2 j)
 Kronecker delta \( \delta_{ij} \).

Function Documentation

◆ kronecker()

template<typename T1, typename T2>
requires (std::is_arithmetic_v<T1> and std::is_arithmetic_v<T2>)
bool triqs::utility::kronecker ( T1 i,
T2 j )
inline

Kronecker delta \( \delta_{ij} \).

Template Parameters
T1Arithmetic type of the first index.
T2Arithmetic type of the second index.
Parameters
iIndex \( i \).
jIndex \( j \).
Returns
True if the given indices are equal, false otherwise.

Definition at line 45 of file kronecker.hpp.