mirror of
https://github.com/triqs/dft_tools
synced 2024-10-31 19:23:45 +01:00
Work on documentation
This commit is contained in:
parent
17ab555213
commit
b251929138
@ -142,9 +142,9 @@ Parameter default value example
|
|||||||
|
|
||||||
.. compileblock:: c
|
.. compileblock:: c
|
||||||
|
|
||||||
#include <triqs/parameters/parameters.hpp>
|
#include <triqs/parameters.hpp>
|
||||||
#include <triqs/parameters/defaults.hpp>
|
using triqs::utility::parameters;
|
||||||
using namespace triqs::utility;
|
using triqs::utility::parameter_defaults;
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
|
|
||||||
@ -152,13 +152,9 @@ Parameter default value example
|
|||||||
P["Beta"] = 3.14;
|
P["Beta"] = 3.14;
|
||||||
|
|
||||||
parameter_defaults pdef;
|
parameter_defaults pdef;
|
||||||
pdef.required
|
pdef.required("Beta", double(), "Inverse temperature")
|
||||||
( "Beta", double(), "Inverse temperature")
|
.optional("Alpha", int(1000), "An integer")
|
||||||
;
|
.optional("Gamma", double(0.9), "A double");
|
||||||
pdef.optional
|
|
||||||
( "Alpha", int(1000), "An integer")
|
|
||||||
( "Gamma", double(0.9), "A double")
|
|
||||||
;
|
|
||||||
|
|
||||||
std::cout<<pdef<<std::endl; // print a comprehensive list of parameters:
|
std::cout<<pdef<<std::endl; // print a comprehensive list of parameters:
|
||||||
std::cout<<P<<std::endl;
|
std::cout<<P<<std::endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user