- hakyung4
- sangwoo2
- analla6
- anahas2
Our program uses data from California Road Network and Points of Interest to find the shortest path of getting to one place from another. We use both BFS and Dijkstra's algorithm to find the shortest path, compare the run time, and decide which one is more efficient.
To use the program, you can copy and paste this to the terminal:
git clone https://github-dev.cs.illinois.edu/cs225-sp22/hakyung4-sangwoo2-analla6-anahas2.git
Our graph class is located in Graph.h
, and all the implementation of functions are in Graph.cpp.
. main.cpp
is where we execute our code. We first ask you to specify start node (starting point) and end node (desitation), first time with BFS and second time with Dijkstra. test1.cpp
includes essential test cases that verify the implementation of algorithms.
To compile:
make
To run the executable:
./final
To compile test cases:
make
clang++ -std=c++14 -stdlib=libc++ -O0 -pedantic -Wall -Werror -Wfatal-errors -Wextra -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -MMD -MP -g -c cs225/catch/catchmain.cpp -o cs225/catch/catchmain.o
clang++ -std=c++14 -stdlib=libc++ -O0 -pedantic -Wall -Werror -Wfatal-errors -Wextra -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -MMD -MP -g -c test1.cpp -o .objs/test1.o
clang++ .objs/Graph.o .objs/test1.o cs225/catch/catchmain.o -std=c++14 -stdlib=libc++ -lc++abi -o test
./test
When compiling and running the execultable main
file, it will ask you to put desired start point and the end point for BFS and Dijkstra's algorithm, and it will print out the shortest path/distance.