diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/online.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/online.c b/src/main/online.c index ba8a94c..fb400ef 100644 --- a/src/main/online.c +++ b/src/main/online.c @@ -13,13 +13,13 @@ int main(int argc, char * argv[]){ struct front_item * front = NULL; struct online_return ret; - if(argc!=5){ + if(argc!=6){ printf("Wrong number of arguments!\n"); - printf("Example usage: %s algorithm1 algorithm2 sort_method data_file\n",argv[0]); + printf("Example usage: %s algorithm1 algorithm2 sort_method cut_pointa data_file\n", argv[0]); return 0; } - data = input(argv[4]); + data = input(argv[5]); /* Sort data */ srand(time(NULL)); @@ -29,10 +29,11 @@ int main(int argc, char * argv[]){ qsort(data->items, data->N, sizeof(struct item), cmp_items_ratio); } + printf("%d\n", atoi(argv[4])); clock_t t = clock(); /* Choose algorithm1 */ if(strcmp(argv[1], "dfs") == 0) { - ret = dfs_online(data, NULL, NULL, 20); + ret = dfs_online(data, NULL, NULL, atoi(argv[4])); } else if(strcmp(argv[1], "random_heuristic") == 0) { ret = random_heuristic_online(data, NULL, NULL); } |