template<typename Tag, typename L, typename R>
struct triqs::gfs::gf_expr< Tag, L, R >
Lazy expression node representing a binary operation between two Green's function operands.
Models the GreenFunction concept, so expressions can be nested and assigned to a triqs::gfs::gf. The mesh and target are deduced from the operands and the operation is evaluated lazily, element by element, on access.
- Template Parameters
-
| Tag | Operation tag (+, -, *, /). |
| L | Type of the left operand (a Green's function or a wrapped scalar). |
| R | Type of the right operand (a Green's function or a wrapped scalar). |
Definition at line 172 of file gf_expr.hpp.
|
|
using | L_t = std::remove_reference_t<L> |
| | Decayed type of the left operand.
|
|
using | mesh_t = typename gfs_expr_tools::_or_<typename L_t::mesh_t, typename R_t::mesh_t>::type |
| | Mesh type of the expression, deduced from the two operands.
|
|
using | R_t = std::remove_reference_t<R> |
| | Decayed type of the right operand.
|
|
using | regular_t = gf<mesh_t, target_t> |
| | Regular (owning) type the expression evaluates to.
|
|
using | target_t = typename gfs_expr_tools::_or_<typename L_t::target_t, typename R_t::target_t>::type |
| | Target type of the expression, deduced from the two operands.
|
|
| template<typename LL, typename RR> |
| | gf_expr (LL &&l_, RR &&r_) |
| | Construct from the two operands.
|
| auto | data_shape () const |
| | Get the data shape of the expression.
|
| auto const & | mesh () const |
| | Get the mesh of the expression (computed lazily and cached).
|
| template<typename... Args> |
| decltype(auto) | operator() (Args &&...1) const |
| | Evaluate the expression via call at the given arguments (one per mesh dimension).
|
| template<typename... Keys> |
| decltype(auto) | operator[] (Keys &&...keys) const |
| | Evaluate the expression via subscript at the given keys.
|
template<typename Tag, typename L, typename R>
template<typename LL, typename RR>
Construct from the two operands.
- Template Parameters
-
| LL | Forwarding type of the left operand. |
| RR | Forwarding type of the right operand. |
- Parameters
-
| l_ | Left operand. |
| r_ | Right operand. |
Definition at line 205 of file gf_expr.hpp.
template<typename Tag, typename L, typename R>
template<typename... Args>
Evaluate the expression via call at the given arguments (one per mesh dimension).
- Template Parameters
-
| Args | Types of the evaluation arguments. |
- Returns
- The result of applying the operation to the operands' evaluated values.
Definition at line 243 of file gf_expr.hpp.
template<typename Tag, typename L, typename R>
template<typename... Keys>
Evaluate the expression via subscript at the given keys.
- Template Parameters
-
| Keys | Types of the access keys. |
- Parameters
-
- Returns
- The result of applying the operation to the operands' subscripted values.
Definition at line 233 of file gf_expr.hpp.