net.walend.digraph
Class HashGEDigraph

java.lang.Object
  |
  +--net.walend.digraph.AbstractHashGEDigraph
        |
        +--net.walend.digraph.HashGEDigraph
All Implemented Interfaces:
Digraph, GEDigraph, HasState, net.walend.enum.Immutable, java.io.Serializable

public final class HashGEDigraph
extends AbstractHashGEDigraph
implements net.walend.enum.Immutable, java.io.Serializable

This class implements the GEDigraph interface using two HashMaps. It's great for sparse graphs.

Since:
20010812
Author:
David Walend dfw1@cornell.edu
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class net.walend.digraph.AbstractHashGEDigraph
AbstractHashGEDigraph.HashEdgeIterator, AbstractHashGEDigraph.NodeIterator, AbstractHashGEDigraph.NodePair
 
Field Summary
 
Fields inherited from class net.walend.digraph.AbstractHashGEDigraph
 
Fields inherited from interface net.walend.digraph.GEDigraph
EMPTY
 
Constructor Summary
HashGEDigraph(CEDigraph digraph)
           
HashGEDigraph(GEDigraph digraph)
           
HashGEDigraph(UEDigraph digraph)
           
 
Method Summary
 EdgeNodeIterator edgeNodeIterator()
          Since HashGEDigraph is immutable, edgeIterator()'s remove() method throws an UnsupportedOperationException.
 java.util.Iterator nodeIterator()
          Since HashGEDigraph is immutable, nodeIterator()'s remove() method throws an UnsupportedOperationException.
 
Methods inherited from class net.walend.digraph.AbstractHashGEDigraph
addEdge, addNode, addNodes, clear, clearEdges, containsEdge, containsGEDigraph, containsNode, containsNodes, countInboundEdges, countOutboundEdges, edgeCount, getFromNodes, getNodes, getPrincipleInterface, getToNodes, intersectWithGEDigraph, isEdgeFree, isEmpty, nodeCount, removeEdge, removeGEDigraph, removeNode, removeNodes, retainNodes, sameGEDigraphAs, sameStateAs, toString, unionGEDigraph
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HashGEDigraph

public HashGEDigraph(GEDigraph digraph)

HashGEDigraph

public HashGEDigraph(CEDigraph digraph)

HashGEDigraph

public HashGEDigraph(UEDigraph digraph)
Method Detail

nodeIterator

public java.util.Iterator nodeIterator()
Since HashGEDigraph is immutable, nodeIterator()'s remove() method throws an UnsupportedOperationException.

Specified by:
nodeIterator in interface Digraph
Overrides:
nodeIterator in class AbstractHashGEDigraph

edgeNodeIterator

public EdgeNodeIterator edgeNodeIterator()
Since HashGEDigraph is immutable, edgeIterator()'s remove() method throws an UnsupportedOperationException.

Specified by:
edgeNodeIterator in interface Digraph
Overrides:
edgeNodeIterator in class AbstractHashGEDigraph


Copyright (c) 2001, 2002, David Walend