template<Mesh M, typename Target, typename Layout>
class triqs::gfs::gf_view< M, Target, Layout >
A mutable, non-owning view of a Green's function.
triqs::gfs::gf_view refers to the mesh and data of an existing Green's function (or a slice thereof) without owning them. Assigning to a view writes through to the underlying data. See triqs::gfs::gf for the owning container and triqs::gfs::gf_const_view for the read-only view.
- Template Parameters
-
| M | Mesh type, modeling triqs::mesh::Mesh; fixes the domain of definition. |
| Target | Target type; fixes the value stored at each mesh point. |
| Layout | Memory layout policy of the data array view. |
Definition at line 48 of file gf_view.hpp.
|
|
using | complex_t = gf_view<M, typename Target::complex_t, Layout> |
| | Associated complex-valued type.
|
|
using | const_view_type = gf_const_view<M, Target, Layout> |
| | Associated const view type.
|
|
using | data_t = nda::basic_array_view<scalar_t, data_rank, Layout> |
| | Type of the data array view.
|
|
using | mesh_index_t = typename mesh_t::index_t |
| | Type of a mesh index.
|
|
using | mesh_point_t = typename mesh_t::mesh_point_t |
| | Type of a mesh point.
|
|
using | mesh_t = M |
| | Mesh type.
|
|
using | mutable_view_type = gf_view<M, Target, Layout> |
| | Associated mutable view type.
|
|
using | real_t = gf_view<M, typename Target::real_t, Layout> |
| | Associated real-valued type.
|
|
using | regular_type = gf<M, Target, typename Layout::contiguous_t> |
| | Associated regular (owning) type.
|
|
using | scalar_t = typename Target::scalar_t |
| | Scalar type of the target (real or complex).
|
|
using | target_shape_t = std::array<long, Target::rank> |
| | Type of the target shape, i.e. an array holding the extent of each target dimension.
|
|
using | target_t = Target |
| | Target type.
|
|
using | view_type = gf_view<M, Target, Layout> |
| | Associated (non const) view type.
|
|
|
| gf_view ()=default |
| | Construct an empty view, not bound to any data.
|
| template<typename L> |
| | gf_view (gf< M, Target, L > &&g) noexcept |
| | Construct a view onto an rvalue Green's function.
|
| template<typename L> |
| | gf_view (gf< M, Target, L > &g) |
| | Construct a view onto a (non const) Green's function.
|
|
template<typename L> |
| | gf_view (gf< M, Target, L > const &g)=delete |
| | Deleted: a mutable view cannot be built from a const Green's function.
|
|
| gf_view (gf_const_view< M, Target > const &g)=delete |
| | Deleted: a mutable view cannot be built from a const view.
|
|
| gf_view (gf_view &&)=default |
| | Move constructor.
|
| | gf_view (gf_view const &x)=default |
| | Copy constructor (shallow: the new view refers to the same data).
|
| | gf_view (mesh_t m, data_t dat) |
| | Build a view on top of a mesh and a data array.
|
| template<typename Fdata> |
| auto | apply_on_data (Fdata &&fd) |
| | Build a view whose data is the result of applying a function to the data array.
|
| template<typename Fdata> |
| auto | apply_on_data (Fdata &&fd) const |
| | Build a const view whose data is the result of applying a function to the data array.
|
| data_t & | data () & |
| | Get the data array view.
|
| data_t | data () && |
| | Get the data array view (rvalue overload).
|
| data_t const & | data () const & |
| | Get the data array view (const overload).
|
| auto const & | data_shape () const |
| | Get the shape of the data array.
|
| mesh_t const & | mesh () const |
| | Get the mesh of the Green's function.
|
|
template<typename... Args> |
| decltype(auto) | operator() (Args &&...1) & |
| | Lvalue overload of the call operator (delegates to call_impl()).
|
|
template<typename... Args> |
| decltype(auto) | operator() (Args &&...1) && |
| | Rvalue overload of the call operator (delegates to call_impl()).
|
|
template<typename... Args> |
| decltype(auto) | operator() (Args &&...1) const & |
| | Const lvalue overload of the call operator (delegates to call_impl()).
|
| gf_view & | operator= (gf_view const &rhs) |
| | Copy assignment: copy the data through the view without resizing it.
|
| template<typename RHS> |
| gf_view & | operator= (RHS const &rhs) |
| | Assign from any compatible right hand side, writing through the view without resizing it.
|
template<typename... Arg>
requires (sizeof...(Arg) == arity) |
| decltype(auto) | operator[] (Arg &&...arg) &&noexcept(has_no_boundcheck) |
| | Rvalue overload of the variadic operator[] (see the const lvalue overload).
|
template<typename... Arg>
requires (sizeof...(Arg) == arity) |
| decltype(auto) | operator[] (Arg &&...arg) &noexcept(has_no_boundcheck) |
| | Lvalue overload of the variadic operator[] (see the const lvalue overload).
|
template<typename... Arg>
requires (sizeof...(Arg) == arity) |
| decltype(auto) | operator[] (Arg &&...arg) const &noexcept(has_no_boundcheck) |
| | Access the Green's function at a mesh point/index (const lvalue overload).
|
template<typename... T>
requires (sizeof...(T) == arity) |
| decltype(auto) | operator[] (std::tuple< T... > const &tu) const noexcept(has_no_boundcheck) |
| | Access the Green's function at a mesh point/index passed as a tuple (const overload).
|
template<typename... T>
requires (sizeof...(T) == arity) |
| decltype(auto) | operator[] (std::tuple< T... > const &tu) noexcept(has_no_boundcheck) |
| | Non-const overload of the tuple operator[] (see the const overload).
|
| decltype(auto) | operator[] (typename mesh_t::index_t const &index) noexcept(has_no_boundcheck) |
| | Access a single-variable Green's function by a mesh index.
|
| void | rebind (gf_view< M, Target > const &g) noexcept |
| | Rebind the view to refer to the mesh and data of another view.
|
| target_and_shape_t | target () const |
| | Get a handle to the target and its shape.
|
| auto | target_indices () const |
| | Get a generator over the multi-indices of the target space.
|
| std::array< long, Target::rank > | target_shape () const |
| | Get the shape of the target.
|
template<Mesh M, typename Target, typename Layout>
template<typename Self, typename... Args>
| decltype(auto) triqs::gfs::gf_view< M, Target, Layout >::call_impl |
( |
Self && | self, |
|
|
Args &&... | 1 ) |
|
inlinestatic |
Evaluate the Green's function at the given arguments.
With no argument, returns a (const) view of the whole Green's function. Otherwise, the number of arguments must equal the arity of the mesh; if any argument is a lazy CLEF expression a lazy call expression is returned, else the Green's function is evaluated using the mesh's interpolation scheme (triqs::gfs::gf_evaluator).
- Template Parameters
-
| Self | Deduced (explicit object parameter) type of the Green's function. |
| Args | Types of the evaluation arguments (one per mesh dimension). |
- Returns
- A view (no argument), a lazy expression (lazy arguments) or the interpolated value.
Definition at line 49 of file gf_view.hpp.