mirror of
https://github.com/triqs/dft_tools
synced 2024-11-02 04:03:49 +01:00
29 lines
556 B
C++
29 lines
556 B
C++
|
#include <triqs/parameters.hpp>
|
||
|
using triqs::params::parameters;
|
||
|
#include <triqs/arrays.hpp>
|
||
|
|
||
|
int main() {
|
||
|
|
||
|
parameters P;
|
||
|
/*
|
||
|
P["a"] = long(1);
|
||
|
P["d"] = 2.7;
|
||
|
P["a_string"] = std::string("-14.3");
|
||
|
P["char_string"] = "-14.3";
|
||
|
|
||
|
triqs::arrays::array<double, 2> A(2, 2);
|
||
|
A() = 0;
|
||
|
A(0, 0) = 1.3;
|
||
|
A(1, 1) = -8.2;
|
||
|
P["A"] = A;
|
||
|
std::cout << "A:" << P["A"] << std::endl;
|
||
|
|
||
|
long a = P["a"];
|
||
|
double x = P["a"]; // cast to double from long
|
||
|
double y = P["a_string"]; // lexical cast to double from string
|
||
|
std::cout << y << std::endl;
|
||
|
*/
|
||
|
return 0;
|
||
|
}
|
||
|
|