38namespace triqs::mesh {
83 [[nodiscard]]
long index()
const {
return n; }
86 operator cast_t()
const {
return std::complex<double>{0, std::numbers::pi *
static_cast<double>(2 *
n +
statistic) /
beta}; }
105 C2PY_IGNORE
inline std::ostream &
operator<<(std::ostream &sout,
matsubara_freq const &iw) {
return sout << std::complex<double>(iw); }
160 return std::complex<double>{iw1} / std::complex<double>{iw2};
173 return std::complex<double>{iw1} * std::complex<double>{iw2};
178 template <typename T> \
179 requires(not std::is_base_of_v<matsubara_freq, std::decay_t<T>>) \
180 [[nodiscard]] inline auto operator OP(matsubara_freq const &iw, T &&y) { \
181 return std::complex<double>(iw) OP std::forward<T>(y); \
184 template <typename T> \
185 requires(not std::is_base_of_v<matsubara_freq, std::decay_t<T>>) \
186 [[nodiscard]] inline auto operator OP(T &&x, matsubara_freq const &iw) { \
187 return std::forward<T>(x) OP std::complex<double>(iw); \
k_expr<'+', L, R > operator+(L &&l, R &&r)
Lazy addition of two triqs::mesh::BzMeshPoint objects.
k_expr_unary<'-', L > operator-(L &&l)
Lazy unary minus for triqs::mesh::BzMeshPoint objects.
k_expr<' *', long, R > operator*(Int l, R &&r)
Lazy multiplication of a triqs::mesh::BzMeshPoint object with a scalar.
auto operator/(matsubara_freq const &iw1, matsubara_freq const &iw2)
Divison operator for two triqs::mesh::matsubara_freq objects.
bool kronecker(matsubara_freq const &iw)
Kronecker delta function for a single Matsubara frequency.
std::ostream & operator<<(std::ostream &sout, matsubara_freq const &iw)
Write a triqs::mesh::matsubara_freq to a std::ostream.
statistic_enum
Enum to specify particle statistics.
Kronecker delta for arithmetic types, with a CLEF lazy-expression hook.
Common macros used in TRIQS.
Provides various utilities used with Meshes.
matsubara_freq()=default
Default constructor initializes the Matsubara frequency with zero index, zero inverse temperature and...
Represents a Matsubara frequency .
double beta
Inverse temperature .
matsubara_freq(long n_idx, double b, statistic_enum stat)
Construct a Matsubara frequency with a given index , inverse temperature and particle statistics.
long index() const
Get the index of the Matsubara frequency.
std::complex< double > cast_t
Value type of a Matsubara frequency.
statistic_enum statistic
Particle statistics.
std::partial_ordering operator<=>(matsubara_freq const &other) const
Partial ordering by index when beta and statistic match, unordered otherwise.
bool operator==(matsubara_freq const &) const =default
Equality comparison.
matsubara_freq()=default
Default constructor initializes the Matsubara frequency with zero index, zero inverse temperature and...