net.walend.digraph
Interface GEDigraph

All Superinterfaces:
Digraph, HasState
All Known Subinterfaces:
GEPath, IndexedGEDigraph, IndexedMutableGEDigraph, MeasuredGEPath, MutableGEDigraph, MutableGEPath
All Known Implementing Classes:
AbstractDelegateDigraphOfGEPaths.DigraphGEPath, AbstractHashGEDigraph, AbstractListGEPath, AbstractMatrixGEDigraph, AbstractShortestGEPaths.DigraphMeasuredGEPath, GEBellmanFordTest.BFGEDigraph, MutableHashGEDigraph, MutableListGEPath, MutableLMGEDigraph, MutableMatrixGEDigraph

public interface GEDigraph
extends Digraph

GEDigraph is an interface for representing directed graphs of nodes linked by zero or one edge. Each node must be a unique Object in the digraph. Edges are not objects at all, and are represented simply by being present or not.

By default, this digraph uses equals() as the method to determine identity.

Direct implementations of GEDigraph should have a single constructor that takes a GEDigraph as a parameter.

Since:
20010812
Author:
David Walend dfw1@cornell.edu

Field Summary
static GEDigraph EMPTY
           
 
Method Summary
 boolean containsGEDigraph(GEDigraph digraph)
          Returns true if digraph is a subgraph of this GEDigraph.
 GEDigraph intersectWithGEDigraph(GEDigraph digraph)
          Returns a new digraph that is the intersection of this with digraph.
 boolean sameGEDigraphAs(GEDigraph digraph)
          Returns true if digraph is the same as this; that is, if this.containsGEDigraph(digraph) and digraph.containsGEDigraph(this).
 GEDigraph unionGEDigraph(GEDigraph digraph)
          Returns a new digraph that is the union of this with digraph.
 
Methods inherited from interface net.walend.digraph.Digraph
containsEdge, containsNode, containsNodes, countInboundEdges, countOutboundEdges, edgeCount, edgeNodeIterator, getFromNodes, getNodes, getToNodes, isEdgeFree, isEmpty, nodeCount, nodeIterator
 
Methods inherited from interface net.walend.collection.HasState
getPrincipleInterface, sameStateAs
 

Field Detail

EMPTY

public static final GEDigraph EMPTY
Method Detail

containsGEDigraph

public boolean containsGEDigraph(GEDigraph digraph)
Returns true if digraph is a subgraph of this GEDigraph.


sameGEDigraphAs

public boolean sameGEDigraphAs(GEDigraph digraph)
Returns true if digraph is the same as this; that is, if this.containsGEDigraph(digraph) and digraph.containsGEDigraph(this).


intersectWithGEDigraph

public GEDigraph intersectWithGEDigraph(GEDigraph digraph)
Returns a new digraph that is the intersection of this with digraph. Implementations should generally return the same implementation of GEDigraph as they have themselves.


unionGEDigraph

public GEDigraph unionGEDigraph(GEDigraph digraph)
Returns a new digraph that is the union of this with digraph. Implementations should generally return the same implementation of GEDigraph as they are themselves. If the digraphs contain conflicting edges, then (unless you have a better rule) let digraph's edge win out.



Copyright (c) 2001, 2002, David Walend