derive_h48.c (1138B)
1 /* 2 This tool is specific to the H48 solver. It can be used to derive small 3 intermediate tables from larger tables, including the full h11 table. 4 5 When using k=2, the base values for the tables may differ. If you want 6 to change this value, for example for generating a table with base = 9 7 from the h11 table with base = 10, you must re-generate the large table 8 with the correct base value. The easiest way to do so is to manually 9 edit the base value in the source code and recompile. 10 */ 11 12 #include "../tool.h" 13 14 char *solver_large, *solver_small, *filename_large, *filename_small; 15 16 void run(void) { 17 derivedata_run(solver_large, solver_small, filename_large, filename_small); 18 } 19 20 int main(int argc, char **argv) { 21 if (argc < 5) { 22 printf("Error: not enough arguments. Required:\n" 23 "1. Solver name for large table\n" 24 "2. Solver name for derived table\n" 25 "3. Filename containing large table\n" 26 "4. Filename for saving derived table\n"); 27 return 1; 28 } 29 30 solver_large = argv[1]; 31 solver_small = argv[2]; 32 filename_large = argv[3]; 33 filename_small = argv[4]; 34 35 nissy_setlogger(log_stderr); 36 37 timerun(run); 38 39 return 0; 40 }