Did you know ... Search Documentation:
Packs (add-ons) for SWI-Prolog

Package "graphpl"

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

Reviews

No reviews. Create the first review!.

Details by download location

VersionSHA1#DownloadsURL
0.188d49a7976b643fd2636756174847e2706705a2d1https://github.com/damianoazzolini/graphpl/archive/V0.1.zip
0.1.115d9eb6cde7560175d0816157c2c525de99d6abb1https://github.com/damianoazzolini/graphpl.git
15e488f23a4f4dfbeb4f003ac7225b57d72df0b62https://github.com/damianoazzolini/graphpl.git
20ff1d3aa00f8c302b38f18e0a8c9976a1cde4bc5https://github.com/damianoazzolini/graphpl.git
454359062b6b65500de41e8ad875bd738c2c5bbe21https://github.com/damianoazzolini/graphpl.git
90e6dbfae1242bb3f9a6f3d968a789c3f6de5b1814https://github.com/damianoazzolini/graphpl/archive/V0.1.1.zip
f9114fbc8a33663a1dda7982946edff2baf5e5e82https://github.com/damianoazzolini/graphpl.git

graphpl

SWI prolog package to manage graphs.

Basic info

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)).

Available Predicates

Example

:- 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)]).

Contribution

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.

Contents of pack "graphpl"

Pack contains 6 files holding a total of 14.0K bytes.