Skip to content

Commit 7ad9a4d

Browse files
committed
update readme & bug fix
1 parent fcd238e commit 7ad9a4d

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
# Visualization of max flow algorithms
22

3-
implemented algorithms:
3+
## Implemented algorithms
44
- Ford-Fulkerson
55
- Edmonds-Karp
66
- Capacity Scaling
77
- Dinic
8-
- Goldberg-Tarjan
8+
- Goldberg-Tarjan/Preflow-Push
9+
10+
11+
# Usage
12+
install the requirements:
13+
```
14+
pip install -r requirements.txt
15+
```
16+
and execute the ``main`` file:
17+
```
18+
python3 main.py
19+
```

main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def render_goldberg_tarjan(self, edges, excess, label, node_id):
204204
outline="red", width=3)
205205

206206
for edge in self.graph.get_base_edges():
207-
color = "red" if edge in edges else "black"
207+
color = "red" if edge in edges or edge.reverse_edge in edges else "black"
208208
self.render_edge(edge, color)
209209

210210
def render_ford_fulkerson(self, edges):

0 commit comments

Comments
 (0)