Last Modified
2013-07-12 23:08:05 +0000
Requires
  • rgl/mutable
  • set

Description

adjacency.rb

$Id: adjacency.rb,v 1.12 2008/08/23 05:37:05 javanthropus Exp $

The DirectedAdjacencyGraph class implements a generalized adjacency list graph structure. An AdjacencyGraph is basically a two-dimensional structure (ie, a list of lists). Each element of the first dimension represents a vertex. Each of the vertices contains a one-dimensional structure that is the list of all adjacent vertices.

The class for representing the adjacency list of a vertex is, by default, a Set. This can be configured by the client, however, when an AdjacencyGraph is created.