net.walend.digraph
Class HashUEDigraph

java.lang.Object
  |
  +--net.walend.digraph.AbstractHashUEDigraph
        |
        +--net.walend.digraph.HashUEDigraph
All Implemented Interfaces:
Digraph, HasState, net.walend.enum.Immutable, java.io.Serializable, UEDigraph

public final class HashUEDigraph
extends AbstractHashUEDigraph
implements net.walend.enum.Immutable, java.io.Serializable

This class implements the UEDigraph interface using three HashMaps. It's great for sparse graphs.

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

Nested Class Summary
 
Nested classes inherited from class net.walend.digraph.AbstractHashUEDigraph
AbstractHashUEDigraph.HashEdgeIterator, AbstractHashUEDigraph.NodeIterator, AbstractHashUEDigraph.NodePair
 
Field Summary
 
Fields inherited from class net.walend.digraph.AbstractHashUEDigraph
 
Fields inherited from interface net.walend.digraph.UEDigraph
EMPTY
 
Constructor Summary
HashUEDigraph(UEDigraph digraph)
           
 
Method Summary
 EdgeIterator edgeIterator()
          Since HashCEDigraph is immutable, edgeIterator()'s remove() method throws an UnsupportedOperationException.
 java.util.Iterator nodeIterator()
          Implementations should explicitly state how they interpret nodeIterator()'s remove method.
 
Methods inherited from class net.walend.digraph.AbstractHashUEDigraph
addEdge, addNode, addNodes, clear, clearEdges, containsEdge, containsEdge, containsEdge, containsEdges, containsNode, containsNodes, containsUEDigraph, countInboundEdges, countOutboundEdges, edgeCount, edgeNodeIterator, getEdge, getEdges, getFromNode, getFromNodes, getInboundEdges, getNodes, getOutboundEdges, getPrincipleInterface, getToNode, getToNodes, intersectWithUEDigraph, isEdgeFree, isEmpty, nodeCount, removeEdge, removeEdge, removeEdges, removeNode, removeNodes, removeUEDigraph, retainEdges, retainNodes, sameStateAs, sameUEDigraphAs, toString, unionUEDigraph
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HashUEDigraph

public HashUEDigraph(UEDigraph digraph)
Method Detail

edgeIterator

public EdgeIterator edgeIterator()
Since HashCEDigraph is immutable, edgeIterator()'s remove() method throws an UnsupportedOperationException.

Specified by:
edgeIterator in interface UEDigraph
Overrides:
edgeIterator in class AbstractHashUEDigraph

nodeIterator

public java.util.Iterator nodeIterator()
Description copied from interface: Digraph
Implementations should explicitly state how they interpret nodeIterator()'s remove method. It should either throw an UnsupportedOperationException or cause a hidden side effects of removing edges.

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


Copyright (c) 2001, 2002, David Walend