-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7cd4f96
commit fae00c6
Showing
8 changed files
with
161 additions
and
85 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
### Graph coloring | ||
|
||
**Features used:** | ||
- Clingo integration | ||
- Multi model | ||
- Rendering | ||
- Model selection | ||
- View | ||
|
||
```console | ||
clingo examples/color/color.lp --outf=2 | clingraph --out=render --view --dir='out/color' --format=png --select-model=0 -log=info | ||
``` | ||
|
||
![](https://raw.githubusercontent.com/potassco/clingraph/master/examples/color/default.png) | ||
|
||
- `color.lp` | ||
```prolog | ||
node(1..6). | ||
edge( | ||
(1,2); (1,3); (1,4); | ||
(2,4); (2,5); (2,6); | ||
(3,4); (3,5); | ||
(5,6) | ||
). | ||
color(red; green; blue). | ||
{ assign(N, C) : color(C) } = 1 :- node(N). | ||
:- edge((N, M)), assign(N, C), assign(M, C). | ||
#show node/1. | ||
#show edge/1. | ||
#show attr(node, N, style, filled): node(N). | ||
#show attr(node, N, color, C) : assign(N, C). | ||
``` |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
```{include} ../../../examples/README.md | ||
``` | ||
|
||
```{toctree} | ||
color.md | ||
``` | ||
|
Oops, something went wrong.