Skip to content

Commit 19cb9d7

Browse files
committed
change spelling of file names (and in notebook) to coloring
1 parent 7b42165 commit 19cb9d7

File tree

8 files changed

+763
-14
lines changed

8 files changed

+763
-14
lines changed

Diff for: content/algorithms/graph-colouring/graph_colouring.md renamed to content/algorithms/graph-coloring/graph_coloring.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ import requests
3535
%matplotlib inline
3636
```
3737

38-
### Greedy Colouring:
38+
### Greedy Coloring:
3939

40-
The priority of colours/labels assigned is given by the strategies. Below is the list of strategies in networkx.
40+
The priority of colors/labels assigned is given by the strategies. Below is the list of strategies in networkx.
4141
You can also add your custom strategy.
4242

4343
```{code-cell}
44-
# Load the stratagies for the greedy colouring present in the networkx library
44+
# Load the stratagies for the greedy coloring present in the networkx library
4545
strategies = nx.coloring.greedy_coloring.STRATEGIES
4646
```
4747

@@ -96,20 +96,20 @@ nx.draw(random_graph, with_labels=True)
9696

9797
+++
9898

99-
![png](graph-colouring/graph_colouring_files/graph-colouring/graph_colouring_7_0.png)
99+
![png](graph-coloring/graph_coloring_files/graph-coloring/graph_coloring_7_0.png)
100100

101101

102102

103103
```{code-cell}
104-
# Get the greedy colouring for all the strategies
104+
# Get the greedy coloring for all the strategies
105105
colors = {
106106
current_strategy: nx.greedy_color(random_graph, strategy=current_strategy)
107107
for current_strategy in strategies
108108
}
109109
```
110110

111111
```{code-cell}
112-
# Show the greedy colouring for selected strategy: DSATUR
112+
# Show the greedy coloring for selected strategy: DSATUR
113113
selected_strategy = "DSATUR"
114114
115115
# Get the position of the nodes
@@ -157,7 +157,7 @@ nx.draw_networkx_edges(random_graph, pos=pos)
157157

158158

159159

160-
![png](graph-colouring/graph_colouring_files/graph-colouring/graph_colouring_9_1.png)
160+
![png](graph-coloring/graph_coloring_files/graph-coloring/graph_coloring_9_1.png)
161161

162162

163163
+++
@@ -231,7 +231,7 @@ ani = animation.FuncAnimation(
231231

232232
```{code-cell}
233233
# Save the animation as gif
234-
gif_file_path = r"greedy_colouring.gif"
234+
gif_file_path = r"greedy_coloring.gif"
235235
writergif = animation.PillowWriter(fps=1)
236236
ani.save(gif_file_path, writer=writergif)
237237
```
@@ -252,7 +252,7 @@ display_animation(gif_file_path)
252252

253253
+++
254254

255-
![png](graph-colouring/graph_colouring_files/graph-colouring/graph_colouring_16_0.png)
255+
![png](graph-coloring/graph_coloring_files/graph-coloring/graph_coloring_16_0.png)
256256

257257

258258
+++
@@ -291,7 +291,7 @@ state_data = gpd.read_file(indian_map_url)
291291

292292
+++
293293

294-
![png](graph-colouring/graph_colouring_files/graph-colouring/graph_colouring_21_0.png)
294+
![png](graph-coloring/graph_coloring_files/graph-coloring/graph_coloring_21_0.png)
295295

296296

297297

@@ -326,7 +326,7 @@ nx.draw(indian_states, with_labels=True)
326326

327327
+++
328328

329-
![png](graph-colouring/graph_colouring_files/graph-colouring/graph_colouring_26_0.png)
329+
![png](graph-coloring/graph_coloring_files/graph-coloring/graph_coloring_26_0.png)
330330

331331

332332

@@ -365,15 +365,15 @@ patch = nx.draw_networkx_edges(indian_states, pos=pos)
365365

366366
+++
367367

368-
![png](graph-colouring/graph_colouring_files/graph-colouring/graph_colouring_29_0.png)
368+
![png](graph-coloring/graph_coloring_files/graph-coloring/graph_coloring_29_0.png)
369369

370370

371371

372372
```{code-cell}
373373
state_data["color"] = state_data["ID_1"].map(india_state_colors[selected_strategy])
374374
state_data["color"].fillna(
375375
0, inplace=True
376-
) # assigning default colour to states without any neighbours
376+
) # assigning default color to states without any neighbours
377377
```
378378

379379
```{code-cell}
@@ -404,4 +404,4 @@ folium.LayerControl().add_to(m) # use folium to add layer control
404404

405405
+++
406406

407-
![png](graph-colouring/graph_colouring_files/graph-colouring/graph_colouring_32_0.png)
407+
![png](graph-coloring/graph_coloring_files/graph-coloring/graph_coloring_32_0.png)

0 commit comments

Comments
 (0)