org.javanetworkanalyzer.alg
Class DFSForStrahler<E extends EdgeSPT>

java.lang.Object
  extended by org.javanetworkanalyzer.alg.GraphSearchAlgorithm<V,E>
      extended by org.javanetworkanalyzer.alg.DFS<VStrahler,E>
          extended by org.javanetworkanalyzer.alg.DFSForStrahler<E>
All Implemented Interfaces:
TraversalAlg<VStrahler,E>

public class DFSForStrahler<E extends EdgeSPT>
extends DFS<VStrahler,E>

Calculates the Strahler numbers of the nodes in the given tree.

The graph passed to the constructor is assumed to be a tree. If is is not a tree, this algorithm will return results, but they will be false.

This function is executed by calling DFS.calculate(org.javanetworkanalyzer.data.VDFS) on the tree's root node.

Author:
Adam Gouge
See Also:
http://en.wikipedia.org/wiki/Strahler_number

Field Summary
 
Fields inherited from class org.javanetworkanalyzer.alg.GraphSearchAlgorithm
currentStartNode, graph
 
Constructor Summary
DFSForStrahler(org.jgrapht.Graph<VStrahler,E> graph)
          Constructor.
 
Method Summary
protected  void visit(VStrahler node)
          Visit the given node and calculate its Strahler number.
 
Methods inherited from class org.javanetworkanalyzer.alg.DFS
calculate, calculate
 
Methods inherited from class org.javanetworkanalyzer.alg.GraphSearchAlgorithm
init, outdegree, outgoingEdgesOf, outgoingEdgesOf, reconstructTraversalGraph, successorListOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DFSForStrahler

public DFSForStrahler(org.jgrapht.Graph<VStrahler,E> graph)
Constructor.

Parameters:
graph - The graph.
Method Detail

visit

protected void visit(VStrahler node)
Visit the given node and calculate its Strahler number.

Overrides:
visit in class DFS<VStrahler,E extends EdgeSPT>
Parameters:
node - The node.


Copyright © 2014. All Rights Reserved.