Skip to content

Commit abdc6be

Browse files
committed
Update README, lower CMake min version
1 parent b1ed104 commit abdc6be

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
lines changed

CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.17)
1+
cmake_minimum_required(VERSION 3.10)
22
project(graphs_cpp)
33

44
set(CMAKE_CXX_STANDARD 17)
@@ -9,4 +9,4 @@ else()
99
add_compile_options(-Wall -Wextra -Wpedantic)
1010
endif()
1111

12-
add_executable(graphs_test main.cpp)
12+
add_executable(graphs_test main.cpp)

README.md

+24-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,33 @@
1-
# WIP: C++ code for graphs
1+
# Graphs with modern C++
2+
3+
## General
4+
- Code for graph problems
5+
- uses modern C++ instead of `new` and other dated patterns; e.g.
6+
- `std::vector`
7+
- `std::unique_ptr`
8+
- this is an example project and not a huge library
9+
10+
## Compilation
11+
- Manually: `g++ -std=c++17 -O3 main.cpp -o graphs_test`
12+
- or with `cmake`:
13+
```bash
14+
mkdir build
15+
cd build/
16+
cmake ..
17+
make
18+
```
219

320
## `Graph.h`
421
- Simple `Graph` interface
522
- `AdjacencyListGraph` (https://en.wikipedia.org/wiki/Adjacency_list)
623
- Utility functions (a few)
7-
- Depth First Search
8-
- Breadth First Search
24+
- Depth-first Search (DFS, https://en.wikipedia.org/wiki/Depth-first_search)
25+
- Breadth-first Search (BFS, https://en.wikipedia.org/wiki/Breadth-first_search)
926

1027
## `main.cpp`
1128
- Basic test of `Graph.h` functionality
12-
- Reads graphs from standard input or file given as program argument (`./graphs_test < tinyG.txt`)
29+
- Reads graphs from standard input (`./graphs_test < tinyG.txt`) or file given as program argument (`./graphs_test tinyG.txt`)
1330
![](picTinyG.png)
31+
32+
## References
33+
- Algorithms, [Part II](https://www.coursera.org/learn/algorithms-part2/home/welcome) by Princeton University (Robert Sedgewick, Kevin Wayne)

0 commit comments

Comments
 (0)