Package net.walend.digraph

This package contains a kit for working with directed graphs.

See:
          Description

Interface Summary
CEDigraph CEDigraph is an interface for representing directed graphs of nodes linked by zero or one edge.
EdgeIterator EdgeIterator extends EdgeNodeIterator by adding a method to get the current edge.
EdgeNodeIterator EdgeNodeIterator is a special iterator that iterates accross the pairs of nodes that make edges in a digraph.
GEDigraph GEDigraph is an interface for representing directed graphs of nodes linked by zero or one edge.
MutableCEDigraph MutableCEDigraph adds mutators to the CEDigraph interface so that a developer can add and remove edges and nodes.
MutableGEDigraph MutableGEDigraph adds mutators to the GEDigraph interface so that a developer can add and remove edges and nodes.
MutableUEDigraph MutableUEDigraph adds mutators to the UEDigraph interface so that a developer can add and remove edges and nodes.
UEDigraph UEDigraph is an interface for representing directed graphs of nodes linked by zero or one edge.
 

Class Summary
AbstractHashCEDigraph This abstract class implements the CEDigraph interface using a Map and a Set.
AbstractHashGEDigraph This abstract class implements the GEDigraph interface using two HashSets.
AbstractHashUEDigraph This abstract class implements the UEDigraph interface using three HashMaps.
CEDigraphAlgebra Algebra for CEDigraph Operations.
GEDigraphAlgebra Algebra for GEDigraph Operations.
HashCEDigraph This class implements the CEDigraph interface using a Map and a Set.
HashGEDigraph This class implements the GEDigraph interface using two HashMaps.
HashUEDigraph This class implements the UEDigraph interface using three HashMaps.
MutableHashCEDigraph  
MutableHashGEDigraph  
MutableHashUEDigraph  
UEDigraphAlgebra Algebra for UEDigraph Operations.
 

Exception Summary
DigraphException  
EdgeMissingException  
EdgeNotUniqueException  
NodeMissingException  
 

Package net.walend.digraph Description

This package contains a kit for working with directed graphs. It follows the same patterns as in net.walend.collection.

The main interfaces are UEDigraph, a directed graph that's edges must be unique; CEDigraph, a digraph that's edgess are objects, but are not neccessarily unique in the digraph; and GEDigraph, a digraph that's edges are not objects, but mearly a relation between nodes. I hope to eventally make each of these interfaces a child of Digraph.

Each digraph interface has a companion mutable digraph interface that perscribes methods for changing the digraph's state. Digraphs that have no mutator methods and are final should implement the net.walend.collection.Immutable interface.

Each Digraph use a net.walend.collection.Identors to work with generic Objects inside of the digraphs. All nodes in a digraph must be unique, according to the Identator. In UIDigraphs, edges must also be unique.

The package also includes a small hierarchy of exceptions to provide reasonable responses to corner cases.

This package currently contains one implementation of UEDigraph, based on three MutableHashMaps. I have plans to create one based on a List and a Matrix, but haven't gotten to it yet. The hash-based approach is fine for digraphs where the number of edges varies with the number of nodes. However, digraphs with many edges may need a matrix-backed version.



Copyright (c) 2000, 2001, David Walend