mirror of
https://github.com/triqs/dft_tools
synced 2025-01-11 21:48:22 +01:00
gf: inverse for gf_view and gf
- correction
This commit is contained in:
parent
0727bddeee
commit
33b120948d
@ -676,12 +676,17 @@ namespace gfs {
|
||||
g.singularity() = inverse(g.singularity());
|
||||
}
|
||||
|
||||
template <typename Variable, typename Opt> gf<Variable, matrix_valued, Opt> inverse(gf_view<Variable, matrix_valued, Opt> g) {
|
||||
auto res = gf<Variable, matrix_valued, Opt>(g);
|
||||
invert_in_place(res);
|
||||
template <typename Variable, typename Opt> gf<Variable, matrix_valued, Opt> inverse(gf<Variable, matrix_valued, Opt> const & g) {
|
||||
auto res = g;
|
||||
gf_view<Variable, matrix_valued, Opt> v = res;
|
||||
invert_in_place(v);
|
||||
return res;
|
||||
}
|
||||
|
||||
template <typename Variable, typename Opt, bool B> gf<Variable, matrix_valued, Opt> inverse(gf_view<Variable, matrix_valued, Opt, B> g) {
|
||||
return inverse(gf<Variable, matrix_valued, Opt>(g));
|
||||
}
|
||||
|
||||
// ---- transpose : a new gf
|
||||
|
||||
template <typename Variable, typename Opt>
|
||||
|
Loading…
Reference in New Issue
Block a user