Summary
###########################################################################
File: graphpak.icn
Subject: Procedures for manipulating directed graphs
Author: Ralph E. Griswold
Date: May 2, 2001
###########################################################################
This file is in the public domain.
###########################################################################
The procedures here use sets to represent directed graphs. See
The Icon Programming Language, second edition, pp. 195-198.
A value of type "graph" has two components: a list of nodes and
a two-way lookup table. The nodes in turn contain pointers to
other nodes. The two-way table maps a node to its name and
vice-versa.
Graph specifications are give in files in which the first line
is a white-space separated list of node names and subsequent lines
give the arcs, as in
Tucson Phoenix Bisbee Douglas Flagstaff
Tucson->Phoenix
Tucson->Bisbee
Bisbee->Bisbee
Bisbee->Douglas
Douglas->Phoenix
Douglas->Tucson
###########################################################################
Procedures:
closure, read_graph, write_graph
Records:
graph
This file is part of the (main) package.
Source code.
closure(node, close)
: transitive closure of graph
read_graph(f)
: read graph
write_graph(g, f)
: write graph
graph(nodes, lookup)
This page produced by UniDoc on 2021/04/15 @ 23:59:54.