net.walend.digraph
Class MatrixGEDigraph

java.lang.Object
  |
  +--net.walend.digraph.AbstractMatrixGEDigraph
        |
        +--net.walend.digraph.MatrixGEDigraph
All Implemented Interfaces:
Digraph, GEDigraph, HasState, net.walend.enum.Immutable, IndexedDigraph, IndexedGEDigraph, java.io.Serializable

public final class MatrixGEDigraph
extends AbstractMatrixGEDigraph
implements net.walend.enum.Immutable, java.io.Serializable

This class implements the GEDigraph interface using an ArrayList and a boolean matrix. It's great for dense graphs.

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

Nested Class Summary
 
Nested classes inherited from class net.walend.digraph.AbstractMatrixGEDigraph
AbstractMatrixGEDigraph.MatrixEdgeIterator, AbstractMatrixGEDigraph.NodeIterator
 
Field Summary
 
Fields inherited from class net.walend.digraph.AbstractMatrixGEDigraph
 
Fields inherited from interface net.walend.digraph.GEDigraph
EMPTY
 
Constructor Summary
MatrixGEDigraph(CEDigraph digraph)
           
MatrixGEDigraph(GEDigraph digraph)
           
MatrixGEDigraph(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.AbstractMatrixGEDigraph
addEdge, addEdge, addNode, addNodes, clear, clearEdges, containsEdge, containsEdge, containsGEDigraph, containsNode, containsNode, containsNodes, countInboundEdges, countInboundEdges, countOutboundEdges, countOutboundEdges, edgeCount, getFromIndices, getFromNodes, getFromNodes, getNode, getNodeIndex, getNodes, getPrincipleInterface, getToIndices, getToNodes, getToNodes, growMatrix, indexedEdgeNodeIterator, indexedNodeIterator, insureCapacity, intersectWithGEDigraph, isEdgeFree, isEmpty, nodeCapacity, nodeCount, nodeIndices, removeEdge, removeEdge, removeGEDigraph, removeNode, 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
 

Constructor Detail

MatrixGEDigraph

public MatrixGEDigraph(GEDigraph digraph)

MatrixGEDigraph

public MatrixGEDigraph(CEDigraph digraph)

MatrixGEDigraph

public MatrixGEDigraph(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 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