TRIQS/TRIQS
4.0.0
Researching Interacting Quantum Systems
Loading...
Searching...
No Matches
evaluate.cpp
1
#include <
triqs/mesh.hpp
>
2
#include <iostream>
3
4
// Dummy domain.
5
struct
domain {};
6
7
// Overload evaluate for a single dummy domain.
8
auto
evaluate(domain d,
auto
f,
double
x) {
return
f(x); }
9
10
int
main() {
11
// function to evaluate by currying
12
auto
f = [](
double
x,
double
y,
double
z) {
return
x + y + z; };
13
14
// calculate f(1, 2, 3) = 6 using triqs::mesh::evaluate
15
std::cout << triqs::mesh::evaluate(std::make_tuple(domain{}, domain{}, domain{}), f, 1, 2, 3) << std::endl;
16
}
mesh.hpp
Umbrella header for the TRIQS mesh types.
doc
doxygen
examples
evaluate.cpp
Generated by
1.15.0