net.walend.digraph
Class LMGEDigraph
java.lang.Object
  |
  +--net.walend.digraph.AbstractMatrixGEDigraph
        |
        +--net.walend.digraph.AbstractLMGEDigraph
              |
              +--net.walend.digraph.LMGEDigraph
- All Implemented Interfaces: 
 - Digraph, GEDigraph, HasState, net.walend.enum.Immutable, IndexedDigraph, IndexedGEDigraph, java.io.Serializable
 
- public final class LMGEDigraph
- extends AbstractLMGEDigraph
- implements net.walend.enum.Immutable, java.io.Serializable
   
This class implements the GEDigraph interface using an ArrayList and a boolean matrix and keeps an additional int[][] that shows what nodes can be reached from what other nodes. This speeds up the getFromIndices[] method to constant time and the EdgeNodeIterator to O(e) time.
- Author:
 
  - David Walend dfw1@cornell.edu
 
- See Also:
 - Serialized Form
 
 
 
 
 
 
 
 
 
| 
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.AbstractMatrixGEDigraph | 
addEdge, addNode, addNodes, clear, containsEdge, containsEdge, containsGEDigraph, containsNode, containsNode, containsNodes, countInboundEdges, countOutboundEdges, countOutboundEdges, edgeCount, getFromNodes, getFromNodes, getNode, getNodeIndex, getNodes, getPrincipleInterface, getToIndices, getToNodes, getToNodes, indexedEdgeNodeIterator, indexedNodeIterator, insureCapacity, intersectWithGEDigraph, isEdgeFree, isEmpty, nodeCapacity, nodeCount, nodeIndices, removeEdge, removeGEDigraph, removeNode, removeNodes, retainNodes, sameGEDigraphAs, sameStateAs, setNode, toString, unionGEDigraph | 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
 
LMGEDigraph
public LMGEDigraph(GEDigraph digraph)
LMGEDigraph
public LMGEDigraph(CEDigraph digraph)
LMGEDigraph
public LMGEDigraph(UEDigraph digraph)
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 AbstractMatrixGEDigraph
 
 
 
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 AbstractMatrixGEDigraph
 
 
 
Copyright (c) 2001, 2002, David Walend