net.datastructures - version 5.0

net.datastructures
Class ConnectivityDFS<V,E>

java.lang.Object
  extended by net.datastructures.DFS<V,E,Object,Boolean>
      extended by net.datastructures.ConnectivityDFS<V,E>

public class ConnectivityDFS<V,E>
extends DFS<V,E,Object,Boolean>

This class specializes DFS to determine whether the graph is connected.


Field Summary
protected  int reached
           
 
Fields inherited from class net.datastructures.DFS
graph, info, start, STATUS, UNVISITED, VISITED, visitResult
 
Constructor Summary
ConnectivityDFS()
           
 
Method Summary
protected  Boolean finalResult(Boolean dfsResult)
          Returns the final result of the DFS execute method.
protected  void setup()
          Executes the DFS algorithm.
protected  void startVisit(Vertex<V> v)
          Called when we encounter a vertex (v).
 
Methods inherited from class net.datastructures.DFS
dfsTraversal, execute, finishVisit, initResult, isDone, isVisited, result, traverseBack, traverseDiscovery, unVisit, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

reached

protected int reached
Constructor Detail

ConnectivityDFS

public ConnectivityDFS()
Method Detail

setup

protected void setup()
Executes the DFS algorithm.

Overrides:
setup in class DFS<V,E,Object,Boolean>
Parameters:
graph - Input graph
start - Start vertex
info - unused

startVisit

protected void startVisit(Vertex<V> v)
Description copied from class: DFS
Called when we encounter a vertex (v).

Overrides:
startVisit in class DFS<V,E,Object,Boolean>

finalResult

protected Boolean finalResult(Boolean dfsResult)
Description copied from class: DFS
Returns the final result of the DFS execute method.

Overrides:
finalResult in class DFS<V,E,Object,Boolean>

net.datastructures - version 5.0