Did you know ... | Search Documentation: |
Packs (add-ons) for SWI-Prolog |
Title: | Graph data structure utilities |
---|---|
Rating: | Not rated. Create the first rating! |
Latest version: | 0.1.1 |
SHA1 sum: | f9114fbc8a33663a1dda7982946edff2baf5e5e8 |
Author: | Damiano Azzolini <damiano.azzolini@student.unife.it> |
Home page: | https://github.com/damianoazzolini/graphpl |
Download URL: | https://github.com/damianoazzolini/graphpl/releases/*.zip |
No reviews. Create the first review!.
Version | SHA1 | #Downloads | URL |
---|---|---|---|
0.1 | 88d49a7976b643fd2636756174847e2706705a2d | 1 | https://github.com/damianoazzolini/graphpl/archive/V0.1.zip |
0.1.1 | 15d9eb6cde7560175d0816157c2c525de99d6abb | 1 | https://github.com/damianoazzolini/graphpl.git |
15e488f23a4f4dfbeb4f003ac7225b57d72df0b6 | 2 | https://github.com/damianoazzolini/graphpl.git | |
20ff1d3aa00f8c302b38f18e0a8c9976a1cde4bc | 5 | https://github.com/damianoazzolini/graphpl.git | |
454359062b6b65500de41e8ad875bd738c2c5bbe | 21 | https://github.com/damianoazzolini/graphpl.git | |
90e6dbfae1242bb3f9a6f3d968a789c3f6de5b18 | 17 | https://github.com/damianoazzolini/graphpl/archive/V0.1.1.zip | |
f9114fbc8a33663a1dda7982946edff2baf5e5e8 | 2 | https://github.com/damianoazzolini/graphpl.git |
SWI prolog package to manage graphs.
A graph, in this package is represented in this way: graph(ListOfVertices,ListOfEdges)
where ListOfVertices is a list of integer and ListOfEdges is a list of predicates edge/2 or edge/3 where edge/2 is used to for unweighted graphs (edge(NodeA,NodeB)
) and edge/3 is used for weighted graphs (edge(NodeA,NodeB,Cost)
).
:- use_module(library(graph)). test(G):- generate_kn(4,G). ?- test(T). T = graph([1, 2, 3, 4], [edge(1, 2), edge(1, 3), edge(1, 4), edge(2, 3), edge(2, 4), edge(3, 4)]).
Feel free to open an issue if you found some problems or pull request if you want to contribute. Feel free also to suggest predicates that should be good to have.
Pack contains 6 files holding a total of 14.0K bytes.