- Code for graph problems
- uses modern C++ instead of
newand other dated patterns; e.g.std::vectorstd::unique_ptr
- this is an example project and not a huge library
- Manually:
g++ -std=c++17 -O3 main.cpp -o graphs_test - or with
cmake:mkdir build cd build/ cmake .. make
- Simple
Graphinterface AdjacencyListGraph(https://en.wikipedia.org/wiki/Adjacency_list)- Utility functions (a few)
- Depth-first Search (DFS, https://en.wikipedia.org/wiki/Depth-first_search)
- Breadth-first Search (BFS, https://en.wikipedia.org/wiki/Breadth-first_search)
- Basic test of
Graph.hfunctionality - Reads graphs from standard input (
./graphs_test < tinyG.txt) or file given as program argument (./graphs_test tinyG.txt)
- Algorithms, Part II by Princeton University (Robert Sedgewick, Kevin Wayne)