Constructors

Constructors of gf

Constructors Comments
gf() Empty gf
gf(gf const &) Copy construction
gf(gf &&) Move construction
gf(gf_view & g) Make a clone of the view.
gf(gf_const_view & g) Make a clone of the const view.
gf(mesh_t m, target_shape_t s) Constructs a gf with mesh m and a target shape s. s depends on the specialization: it is the information needed
  to construct the gf, aside from the mesh itself: typically the size of the matrix for a matrix_valued gf.
  target_shape_t is described in the specialization section. section XXX). The function is initialized to 0
gf(mesh_t m, data_t dat, [Advanced] Construct a gf from its elements (a mesh, a data array, a singularity, a symmetry, and an evaluator.
singularity_view_t const & si, Normally should be reserved for lib purposes…(remove from the doc ?).
symmetry_t const & s,  
evaluator_t const & eval)  

There are more examples for each specializations in the corresponding pages.

#include <triqs/gfs.hpp>
#include <triqs/mesh.hpp>
using namespace triqs::gfs;
using namespace triqs;
int main() {
  auto beta = 10.0;
  gf<imfreq> gf{{beta, Fermion}, {1, 1}};
}
language:cpp