Java 2 Platform
v1.3

edu.umich.visualsoar.graph
Class DirectedGraph

java.lang.Object
  |
  +--edu.umich.visualsoar.graph.Graph
        |
        +--edu.umich.visualsoar.graph.DirectedGraph
Direct Known Subclasses:
DirectedGraphAsAdjacencyLists

public abstract class DirectedGraph
extends Graph

This class is a graph class that provides an interface for different kinds of graphs it is based on Object-Oriented Design patterns in C++, later converted to Java


Field Summary
 
Fields inherited from class edu.umich.visualsoar.graph.Graph
numberOfEdges, numberOfVertices
 
Constructor Summary
DirectedGraph()
           
 
Method Summary
 edu.umich.visualsoar.graph.SoarVertex getMatchingParent(edu.umich.visualsoar.datamap.SoarWorkingMemoryModel swmm, edu.umich.visualsoar.graph.SoarVertex sv)
          Similar to getParentVertices(), but this looks for a SoarIdentifierVertex that was recently created.
 java.util.List getParentVertices(edu.umich.visualsoar.datamap.SoarWorkingMemoryModel swmm, edu.umich.visualsoar.graph.SoarVertex sv)
          Function uses a Breadth-first traversal to search through all of the vertices to find all vertices that connect to the SoarVertex parameter sv.
 boolean isConnected()
           
 boolean isCyclic()
          Tests the graph for cycles returns true if there is a cycle, false otherwise
abstract  void reduce(java.util.List listOfStartVertices)
          This function finds all vertices that are unreachable from a state and adds them to a list of holes so that they can be recycled for later use
abstract  void resolve()
           
 void topologicalOrderTraversal(edu.umich.visualsoar.util.Visitor visitor)
           
 
Methods inherited from class edu.umich.visualsoar.graph.Graph
addEdge, addVertex, breadthFirstTraversal, depthFirstTraversal, depthFirstTraversal, edges, emanatingEdges, get, incidentEdges, isEdge, numberOfEdges, numberOfVertices, removeEdge, selectEdge, selectVertex, vertices
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectedGraph

public DirectedGraph()
Method Detail

isConnected

public boolean isConnected()
Overrides:
isConnected in class Graph

isCyclic

public boolean isCyclic()
Description copied from class: Graph
Tests the graph for cycles returns true if there is a cycle, false otherwise

Overrides:
isCyclic in class Graph

topologicalOrderTraversal

public void topologicalOrderTraversal(edu.umich.visualsoar.util.Visitor visitor)

getParentVertices

public java.util.List getParentVertices(edu.umich.visualsoar.datamap.SoarWorkingMemoryModel swmm,
                                        edu.umich.visualsoar.graph.SoarVertex sv)
Function uses a Breadth-first traversal to search through all of the vertices to find all vertices that connect to the SoarVertex parameter sv. Returns an enumeration of those vertices.


getMatchingParent

public edu.umich.visualsoar.graph.SoarVertex getMatchingParent(edu.umich.visualsoar.datamap.SoarWorkingMemoryModel swmm,
                                                               edu.umich.visualsoar.graph.SoarVertex sv)
Similar to getParentVertices(), but this looks for a SoarIdentifierVertex that was recently created.


reduce

public abstract void reduce(java.util.List listOfStartVertices)
This function finds all vertices that are unreachable from a state and adds them to a list of holes so that they can be recycled for later use


resolve

public abstract void resolve()

Java 2 Platform
v1.3