Unweighted Graphs¶
%
The following graph manipulation routines are based in code originally written by Richard O'Keefe. The code was then extended to be compatible with the SICStus Prolog ugraphs library. The routines assume directed graphs, undirected graphs may be implemented by using two edges. Graphs are represented in one of two ways:
- The P-representation of a graph is a list of (from-to) vertex pairs, where the pairs can be in any old order. This form is convenient for input/output.
The S-representation of a graph is a list of (vertex-neighbors) pairs, where the pairs are in standard order (as produced by keysort) and the neighbors of each vertex are also in standard order (as produced by sort). This form is convenient for many calculations.
These built-ins are available once included with the use_module(library(ugraphs))
command.
- reachable/4
- complement/3
- neighbours/4
- neighbors/4
- raakau/4
- compose/4
- transpose/3
- transitive_closure/3
- edges/3
- del_edges/4
- add_edges/4
- del_vertices/4
- add_vertices/4
- vertices/3
- prolog::ugraph_union/3
- prolog::reachable/3
- prolog::complement/2
- prolog::neighbours/3
- prolog::neighbors/3
- prolog::top_sort/3
- prolog::top_sort/2
- prolog::compose/3
- prolog::transpose/2
- prolog::transitive_closure/2
- prolog::edges/2
- prolog::del_edges/3
- prolog::add_edges/3
- prolog::del_vertices/3
- prolog::add_vertices/3
- prolog::vertices_edges_to_ugraph/3
- prolog::vertices/2