@@ -338,43 +338,55 @@ int main(int argc, char *argv[]) {
338
338
string output_path;
339
339
ofstream output_file;
340
340
341
- // // A Star
342
- // output_path = TEST_PATH_PREFIX + "a_star.csv";
343
- // output_file.open(output_path);
344
- // output_file << "Bucket, Map Name, Path Length, Time(ms)" << endl;
345
- // for(int i=0;i<156;i++) {
346
- // string map = scene_list[i];
347
- // string scenepath = SCENE_PATH_PREFIX + map;
348
- // solve_map_astar(scenepath, application, map, output_file);
349
- // }
350
- // output_file.flush();
351
- // output_file.close();
341
+ // A Star
342
+ output_path = TEST_PATH_PREFIX + " a_star.csv" ;
343
+ output_file.open (output_path);
344
+ output_file << " Bucket, Map Name, Path Length, Time(ms)" << endl;
345
+ for (int i=0 ;i<156 ;i++) {
346
+ string map = scene_list[i];
347
+ string scenepath = SCENE_PATH_PREFIX + map;
348
+ solve_map_astar (scenepath, application, map, output_file);
349
+ }
350
+ output_file.flush ();
351
+ output_file.close ();
352
352
353
353
// A Star Segmented
354
- // output_path = TEST_PATH_PREFIX + "a_star_segmented.csv";
355
- // output_file.open(output_path);
356
- // output_file << "Bucket, Map Name, Path Length, Time(ms)" << endl;
357
- // for(int i=0;i<156;i++) {
358
- // string map = scene_list[i];
359
- // string scenepath = SCENE_PATH_PREFIX + map;
360
- // solve_map_astar_segmented(scenepath, application, map, output_file);
361
- // }
362
- // output_file.flush();
363
- // output_file.close();
354
+ output_path = TEST_PATH_PREFIX + " a_star_segmented.csv" ;
355
+ output_file.open (output_path);
356
+ output_file << " Bucket, Map Name, Path Length, Time(ms)" << endl;
357
+ for (int i=0 ;i<156 ;i++) {
358
+ string map = scene_list[i];
359
+ string scenepath = SCENE_PATH_PREFIX + map;
360
+ solve_map_astar_segmented (scenepath, application, map, output_file);
361
+ }
362
+ output_file.flush ();
363
+ output_file.close ();
364
+
365
+ // Dijkstra
366
+ output_path = TEST_PATH_PREFIX + " dijkstra.csv" ;
367
+ output_file.open (output_path);
368
+ output_file << " Bucket, Map Name, Path Length, Time(ms)" << endl;
369
+ for (int i=0 ;i<156 ;i++) {
370
+ string map = scene_list[i];
371
+ string scenepath = SCENE_PATH_PREFIX + map;
372
+ solve_map_dijkstra (scenepath, application, map, output_file);
373
+ }
374
+ output_file.flush ();
375
+ output_file.close ();
364
376
365
377
// Dijkstra Segmented
366
- // output_path = TEST_PATH_PREFIX + "dijkstra_segmented.csv";
367
- // output_file.open(output_path);
368
- // output_file << "Bucket, Map Name, Path Length, Time(ms)" << endl;
369
- // for(int i=0;i<156;i++) {
370
- // string map = scene_list[i];
371
- // string scenepath = SCENE_PATH_PREFIX + map;
372
- // solve_map_dijkstra_segmented(scenepath, application, map, output_file);
373
- // }
374
- // output_file.flush();
375
- // output_file.close();
376
-
377
- // // Priority Queue based Dijkstra
378
+ output_path = TEST_PATH_PREFIX + " dijkstra_segmented.csv" ;
379
+ output_file.open (output_path);
380
+ output_file << " Bucket, Map Name, Path Length, Time(ms)" << endl;
381
+ for (int i=0 ;i<156 ;i++) {
382
+ string map = scene_list[i];
383
+ string scenepath = SCENE_PATH_PREFIX + map;
384
+ solve_map_dijkstra_segmented (scenepath, application, map, output_file);
385
+ }
386
+ output_file.flush ();
387
+ output_file.close ();
388
+
389
+ // Priority Queue based Dijkstra
378
390
output_path = TEST_PATH_PREFIX + " pq_dijkstra.csv" ;
379
391
output_file.open (output_path);
380
392
output_file << " Bucket, Map Name, Path Length, Time(ms)" << endl;
@@ -387,28 +399,16 @@ int main(int argc, char *argv[]) {
387
399
output_file.close ();
388
400
389
401
// Priority Queue based Dijkstra Segmented
390
- // output_path = TEST_PATH_PREFIX + "pq_dijkstra_segmented_0.csv";
391
- // output_file.open(output_path);
392
- // output_file << "Bucket, Map Name, Path Length, Time(ms)" << endl;
393
- // for(int i=0;i<156;i++) {
394
- // string map = scene_list[i];
395
- // string scenepath = SCENE_PATH_PREFIX + map;
396
- // solve_map_pqdj_segmented(scenepath, application, map, output_file);
397
- // }
398
- // output_file.flush();
399
- // output_file.close();
400
-
401
- // Dijkstra
402
- // output_path = TEST_PATH_PREFIX + "dijkstra.csv";
403
- // output_file.open(output_path);
404
- // output_file << "Bucket, Map Name, Path Length, Time(ms)" << endl;
405
- // for(int i=0;i<156;i++) {
406
- // string map = scene_list[i];
407
- // string scenepath = SCENE_PATH_PREFIX + map;
408
- // solve_map_dijkstra(scenepath, application, map, output_file);
409
- // }
410
- // output_file.flush();
411
- // output_file.close();
402
+ output_path = TEST_PATH_PREFIX + " pq_dijkstra_segmented_0.csv" ;
403
+ output_file.open (output_path);
404
+ output_file << " Bucket, Map Name, Path Length, Time(ms)" << endl;
405
+ for (int i=0 ;i<156 ;i++) {
406
+ string map = scene_list[i];
407
+ string scenepath = SCENE_PATH_PREFIX + map;
408
+ solve_map_pqdj_segmented (scenepath, application, map, output_file);
409
+ }
410
+ output_file.flush ();
411
+ output_file.close ();
412
412
413
413
return 0 ;
414
414
}
0 commit comments