-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove old config files for Gitpod and Readthedocs. * Update license year. * Remove build and publish targets (now using Actions). * Poetry update. * Add badges and remove old demo from README.
- Loading branch information
1 parent
0ef0f25
commit 20a9d8f
Showing
6 changed files
with
478 additions
and
392 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,3 @@ install: | |
test: | ||
poetry run pytest | ||
|
||
build: | ||
poetry build | ||
|
||
publish: | ||
poetry publish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,8 @@ | ||
# listcolouring | ||
List colouring in Python with NetworkX. | ||
|
||
```python | ||
import networkx as nx | ||
import matplotlib.pyplot as plt | ||
[![PyPI version](https://badge.fury.io/py/listcolouring.svg)](https://badge.fury.io/py/listcolouring) | ||
![python package](https://github.com/MHenderson/listcolouring/actions/workflows/python-package.yml/badge.svg) | ||
![python publish](https://github.com/MHenderson/listcolouring/actions/workflows/python-publish.yml/badge.svg) | ||
|
||
import listcolouring | ||
from listcolouring import list_init, greedy_list_edge_colouring, print_list_edge_colouring | ||
|
||
G = nx.petersen_graph() | ||
# listcolouring | ||
|
||
G = list_init(G, range(0, 10), 3, 0) | ||
G = greedy_list_edge_colouring(G) | ||
|
||
options = {'with_labels': True, 'node_color': "white"} | ||
colors = nx.get_edge_attributes(G,'colour').values() | ||
nx.draw_shell(G, nlist = [range(5, 10), range(5)], edge_color = colors, **options) | ||
List colouring of graphs in Python. | ||
|
||
plt.savefig("img/petersen-shell.png", format = "PNG" | ||
``` |
Oops, something went wrong.