Graphs

Author(s): Francisco Bueno.

This module implements utilities for work with graphs

Usage and interface

Documentation on exports

REGTYPE
dgraph(Graph)

A directed graph is a term graph(V,E) where V is a list of vertices and E is a list of edges (none necessarily sorted). Edges are pairs of vertices which are directed, i.e., (a,b) represents a->b. Two vertices a and b are equal only if a==b.

Usage:dgraph(Graph)

Graph is a directed graph.

    REGTYPE
    dlgraph(Graph)

    A labeled directed graph is a directed graph where edges are triples of the form (a,l,b) where l is the label of the edge (a,b).

    Usage:dlgraph(Graph)

    Graph is a directed labeled graph.

      PREDICATE

      Usage:dgraph_to_ugraph(Graph,UGraph)

      Converts Graph to UGraph.

      • The following properties should hold at call time:
        (term_typing:nonvar/1)Graph is currently a term which is not a free variable.
        (term_typing:var/1)UGraph is a free variable.
        (graphs:dgraph/1)Graph is a directed graph.
        (term_typing:var/1)UGraph is a free variable.
      • The following properties should hold upon exit:
        (graphs:dgraph/1)Graph is a directed graph.
        (ugraphs:ugraph/1)UGraph is an ugraph.

      PREDICATE

      Usage:dlgraph_to_lgraph(Graph,LGraph)

      Converts Edges to LGraph.

      • The following properties should hold at call time:
        (term_typing:nonvar/1)Graph is currently a term which is not a free variable.
        (term_typing:var/1)LGraph is a free variable.
        (graphs:dlgraph/1)Graph is a directed labeled graph.
        (term_typing:var/1)LGraph is a free variable.
      • The following properties should hold upon exit:
        (graphs:dlgraph/1)Graph is a directed labeled graph.
        (lgraphs:lgraph/2)LGraph is a labeled graph of term terms.

      PREDICATE

      Usage:edges_to_ugraph(Edges,UGraph)

      Converts Graph to UGraph.

      • The following properties should hold at call time:
        (term_typing:nonvar/1)Edges is currently a term which is not a free variable.
        (term_typing:var/1)UGraph is a free variable.
        (basic_props:list/2)Edges is a list of pairs.
        (term_typing:var/1)UGraph is a free variable.
      • The following properties should hold upon exit:
        (basic_props:list/2)Edges is a list of pairs.
        (ugraphs:ugraph/1)UGraph is an ugraph.

      PREDICATE

      Usage:edges_to_lgraph(Edges,LGraph)

      Converts Edges to LGraph.

      • The following properties should hold at call time:
        (term_typing:nonvar/1)Edges is currently a term which is not a free variable.
        (term_typing:var/1)LGraph is a free variable.
        (basic_props:list/2)Edges is a list of triples.
        (term_typing:var/1)LGraph is a free variable.
      • The following properties should hold upon exit:
        (basic_props:list/2)Edges is a list of triples.
        (lgraphs:lgraph/2)LGraph is a labeled graph of term terms.

      Documentation on internals

      REGTYPE

      Usage:pair(P)

      P is a pair (_,_).

        REGTYPE

        Usage:triple(P)

        P is a triple (_,_,_).