3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-27 06:43:40 +01:00
dft_tools/test/triqs/clef_examples/sum3.cpp

22 lines
415 B
C++
Raw Normal View History

#include <triqs/arrays.hpp>
/// ---- test ------------
using triqs::arrays::range;
int main() {
triqs::clef::placeholder<0> a_;
triqs::clef::placeholder<1> i_;
triqs::clef::placeholder<2> j_;
auto expr = i_ + 2* j_;
auto xa = sum(a_*i_ , i_=range(0,5));
auto x = eval(xa, a_=2);
std::cout << x << std::endl;
auto y = sum(2*i_ + j_ , i_=range(0,3), j_= range (0,2));
std::cout << y << std::endl;
}