|Did you know ...||Search Documentation:|
|Pack graphpl -- README.md|
Package for SWI prolog 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 is used to for unweighted graphs (
edge/3 is used for wheighted graphs (
:- use_module(library(graph)). test(G):- make_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 could be good to have.