24 std::cout <<
"Usage: " << filename
25 <<
" <temperature> <lattice size> "
26 "<cycles> <burn-in-time> <output file>\n\n"
27 <<
"\t[ -h | --help ]\n";
34int main(
int argc,
char **argv)
37 struct option long_options[] = {{
"help", 0, 0, 0}, {NULL, 0, NULL, 0}};
39 int option_index = -1;
43 c = getopt_long(argc, argv,
"h", long_options, &option_index);
50 switch (option_index) {
71 double temp = atoi(argv[1]);
72 int L = atoi(argv[2]), cycles = atoi(argv[3]), burn_in_time = atoi(argv[4]);
73 std::string outfile = argv[5];
75 montecarlo::pd_estimate(temp, L, cycles, outfile, burn_in_time);
79 std::cout <<
"Time: " << t1 - t0 <<
" seconds\n";
Header for the data_t type.
Functions for Monte Carlo simulations.
void usage(std::string filename)
A function that displays how to use the program and quits.
int main()
The main function.
Function prototypes and macros that are useful.