2013-10-16 23:55:26 +02:00
|
|
|
#define TRIQS_ARRAYS_ENFORCE_BOUNDCHECK
|
|
|
|
#include <triqs/gfs.hpp>
|
|
|
|
using namespace triqs::gfs;
|
|
|
|
using namespace triqs::arrays;
|
2013-07-17 19:24:07 +02:00
|
|
|
#define TEST(X) std::cout << BOOST_PP_STRINGIZE((X)) << " ---> "<< (X) <<std::endl<<std::endl;
|
2013-10-16 23:55:26 +02:00
|
|
|
#include <triqs/gfs/local/functions.hpp>
|
|
|
|
#include <triqs/utility/serialization.hpp>
|
2013-07-17 19:24:07 +02:00
|
|
|
|
|
|
|
int main() {
|
|
|
|
|
|
|
|
double beta =1;
|
2013-10-16 23:55:26 +02:00
|
|
|
auto G = gf<imfreq>{ {beta, Fermion}, {2,2} };
|
2013-07-17 19:24:07 +02:00
|
|
|
double x = 127;
|
|
|
|
std::string s = triqs::serialize(x);
|
|
|
|
|
|
|
|
std::cout << " s = "<< s<< std::endl;
|
|
|
|
std::cout << triqs::deserialize<double>(s) << std::endl;
|
|
|
|
std::cout << triqs::deserialize<int>(s) << std::endl;
|
|
|
|
|
2013-10-16 23:55:26 +02:00
|
|
|
std::vector<std::string> v; v.push_back("abc"); v.push_back("3");
|
|
|
|
std::cout << triqs::serialize(v)<< std::endl;
|
2013-07-17 19:24:07 +02:00
|
|
|
|
|
|
|
}
|