digraph

MODULE

digraph

MODULE SUMMARY

Directed Graphs

DESCRIPTION

This module implements directed graphs. A directed graph consists of
a set of vertices (nodes) and a set of edges (connections).
Both vertices and edges are identified with an Erlang term.
It is possible to have multiple edges between vertices, and both
vertices and edges may have user data attached.

Deletes the graph. This call is important because graphs are
implemented with ets. There is no garbage collection of ets tables.
The graph will, however, be deleted if the process that created the
graph terminates.

Finds a cycle through vertex V. It first attempts to find
cycles longer than one, and then a cycle of one. Returns the
cycle as [V, ..., V] for lengths greater then one,
[V] for lengths of one, and false if no cycle is found.