TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
Loading...
Searching...
No Matches
triqs::mesh::k_expr< OP, L, R >

#include <triqs/mesh/k_expr.hpp>

Detailed Description

template<char OP, typename L, typename R>
struct triqs::mesh::k_expr< OP, L, R >

Binary \( \mathbf{k} \)-vector expression.

Template Parameters
OPOperator tag.
LLeft operand type (either a scalar or a triqs::mesh::brzone::mesh_point_t).
RRight operand type (a triqs::mesh::brzone::mesh_point_t).

Definition at line 67 of file k_expr.hpp.

Public Member Functions

template<typename L1, typename R1>
 k_expr (L1 &&l1, R1 &&r1)
 Construct a binary \( \mathbf{k} \)-vector expression with the given operands.
auto index () const
 Get the index of the \( \mathbf{k} \)-vector corresponding to the evaluated expression.
uint64_t mesh_hash () const
 Get the hash value of the mesh to which the right hand side operand belongs.
auto value () const
 Evaluate the expression template depending on the operator tag.

Constructor & Destructor Documentation

◆ k_expr()

template<char OP, typename L, typename R>
template<typename L1, typename R1>
triqs::mesh::k_expr< OP, L, R >::k_expr ( L1 && l1,
R1 && r1 )
inline

Construct a binary \( \mathbf{k} \)-vector expression with the given operands.

Parameters
l1Left hand side operand.
r1Right hand side operand.

Definition at line 80 of file k_expr.hpp.

Member Function Documentation

◆ index()

template<char OP, typename L, typename R>
auto triqs::mesh::k_expr< OP, L, R >::index ( ) const
inlinenodiscard

Get the index of the \( \mathbf{k} \)-vector corresponding to the evaluated expression.

See value() for the supported expressions.

Returns
Index of the evaluated expression.

Definition at line 109 of file k_expr.hpp.

◆ value()

template<char OP, typename L, typename R>
auto triqs::mesh::k_expr< OP, L, R >::value ( ) const
inlinenodiscard

Evaluate the expression template depending on the operator tag.

The following expressions are supported:

  • \( \mathbf{k}_1 + \mathbf{k}_2 \): Adding two k-vectors.
  • \( \mathbf{k}_1 - \mathbf{k}_2 \): Subtracting two k-vectors.
  • \( c \mathbf{k} \): Multiplying a k-vector by a scalar \( c \).
Returns
Evaluated expression.

Definition at line 92 of file k_expr.hpp.


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