All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jdsl.core.algo.graphtraversals.FindPathDFS

java.lang.Object
   |
   +----jdsl.core.algo.graphtraversals.DFS
           |
           +----jdsl.core.algo.graphtraversals.FindPathDFS

public class FindPathDFS
extends DFS
This class specializes DFS to determine, given a vertex v, if there is a path from the start vertex to v in the connected component of the start vertex. The algorithm returns an enumeration of vertices in the path, or an empty enumeration if the path does not exist.


Variable Index

 o done
 o path
 o targetVert

Constructor Index

 o FindPathDFS()

Method Index

 o execute(InspectableGraph, Vertex, Object)
Runs the depth first search algorithm on a graph.
 o finishVisit(Vertex)
Called when the search has finished with the vertex.
 o isDone()
Tests if the depth first search is done.
 o startVisit(Vertex)
Called when a vertex is visited.

Variables

 o path
 protected Sequence path
 o done
 protected boolean done
 o targetVert
 protected Vertex targetVert

Constructors

 o FindPathDFS
 public FindPathDFS()

Methods

 o execute
 public Object execute(InspectableGraph g,
                       Vertex start,
                       Object info)
Runs the depth first search algorithm on a graph.

Overrides:
execute in class DFS
 o startVisit
 protected void startVisit(Vertex v)
Called when a vertex is visited.

Overrides:
startVisit in class DFS
 o finishVisit
 protected void finishVisit(Vertex v)
Called when the search has finished with the vertex.

Overrides:
finishVisit in class DFS
 o isDone
 protected boolean isDone()
Tests if the depth first search is done.

Overrides:
isDone in class DFS

All Packages  Class Hierarchy  This Package  Previous  Next  Index