net.walend.digraph
Class HashCEDigraph

java.lang.Object
  |
  +--net.walend.digraph.AbstractHashCEDigraph
        |
        +--net.walend.digraph.HashCEDigraph
All Implemented Interfaces:
CEDigraph, Digraph, HasState, net.walend.enum.Immutable, java.io.Serializable

public final class HashCEDigraph
extends AbstractHashCEDigraph
implements net.walend.enum.Immutable, java.io.Serializable

This class implements the CEDigraph interface using a Map and a Set. 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.AbstractHashCEDigraph
AbstractHashCEDigraph.HashEdgeIterator, AbstractHashCEDigraph.NodeIterator, AbstractHashCEDigraph.NodePair
 
Field Summary
 
Fields inherited from class net.walend.digraph.AbstractHashCEDigraph
 
Fields inherited from interface net.walend.digraph.CEDigraph
EMPTY
 
Constructor Summary
HashCEDigraph(CEDigraph digraph)
           
HashCEDigraph(GEDigraph digraph, java.lang.Object edge)
           
HashCEDigraph(UEDigraph digraph)
           
 
Method Summary
 EdgeIterator edgeIterator()
           
 java.util.Iterator nodeIterator()
          Implementations should explicitly state how they interpret nodeIterator()'s remove method.
 
Methods inherited from class net.walend.digraph.AbstractHashCEDigraph
addEdge, addNode, addNodes, clear, clearEdges, containsCEDigraph, containsEdge, containsEdge, containsNode, containsNodes, countInboundEdges, countOutboundEdges, edgeCount, edgeNodeIterator, getEdge, getEdges, getFromNodes, getInboundEdges, getNodes, getOutboundEdges, getPrincipleInterface, getToNodes, intersectWithCEDigraph, isEdgeFree, isEmpty, nodeCount, removeCEDigraph, removeEdge, removeNode, removeNodes, retainNodes, sameCEDigraphAs, sameStateAs, toString, unionCEDigraph
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HashCEDigraph

public HashCEDigraph(CEDigraph digraph)

HashCEDigraph

public HashCEDigraph(UEDigraph digraph)

HashCEDigraph

public HashCEDigraph(GEDigraph digraph,
                     java.lang.Object edge)
Method Detail

edgeIterator

public EdgeIterator edgeIterator()
Specified by:
edgeIterator in interface CEDigraph
Overrides:
edgeIterator in class AbstractHashCEDigraph

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 AbstractHashCEDigraph


Copyright (c) 2001, 2002, David Walend