org.javanetworkanalyzer.analyzers
Class UnweightedGraphAnalyzer<E extends EdgeCent>

java.lang.Object
  extended by org.javanetworkanalyzer.analyzers.GeneralizedGraphAnalyzer<V,E>
      extended by org.javanetworkanalyzer.analyzers.GraphAnalyzer<VUCent,E,UnweightedPathLengthData>
          extended by org.javanetworkanalyzer.analyzers.UnweightedGraphAnalyzer<E>

public class UnweightedGraphAnalyzer<E extends EdgeCent>
extends GraphAnalyzer<VUCent,E,UnweightedPathLengthData>

Calculates various centrality measures on unweighted graphs assumed to be connected using a Breadth-First Search (BFS) to calculate all possible shortest paths.

Author:
Adam Gouge

Field Summary
 
Fields inherited from class org.javanetworkanalyzer.analyzers.GraphAnalyzer
pm, stack
 
Fields inherited from class org.javanetworkanalyzer.analyzers.GeneralizedGraphAnalyzer
graph, nodeCount, nodeSet
 
Constructor Summary
UnweightedGraphAnalyzer(org.jgrapht.Graph<VUCent,E> graph)
          Initializes a new instance of an unweighted graph analyzer that doesn't keep track of progress.
UnweightedGraphAnalyzer(org.jgrapht.Graph<VUCent,E> graph, ProgressMonitor pm)
          Initializes a new instance of an unweighted graph analyzer with the given ProgressMonitor.
 
Method Summary
protected  BFSForCentrality<E> calculateShortestPathsFromNode(VUCent startNode)
          Calculates the number of shortest paths from startNode to every other node and the lengths of these paths using a Breadth-First Search (BFS), storing them in the appropriate node info of #nodeBetweenness; also updates the predecessor sets.
 void computeAll()
          Performs graph analysis and stores the results in a hash map, mapping each node to a data structure holding the results of the analysis.
 
Methods inherited from class org.javanetworkanalyzer.analyzers.GraphAnalyzer
calculateClosenessForNode
 
Methods inherited from class org.javanetworkanalyzer.analyzers.GeneralizedGraphAnalyzer
getGraph
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnweightedGraphAnalyzer

public UnweightedGraphAnalyzer(org.jgrapht.Graph<VUCent,E> graph,
                               ProgressMonitor pm)
                        throws NoSuchMethodException,
                               InstantiationException,
                               IllegalAccessException,
                               IllegalArgumentException,
                               InvocationTargetException
Initializes a new instance of an unweighted graph analyzer with the given ProgressMonitor.

Parameters:
graph - The graph to be analyzed.
pm - The ProgressMonitor to be used.
Throws:
NoSuchMethodException
InstantiationException
IllegalAccessException
IllegalArgumentException
InvocationTargetException

UnweightedGraphAnalyzer

public UnweightedGraphAnalyzer(org.jgrapht.Graph<VUCent,E> graph)
                        throws NoSuchMethodException,
                               InstantiationException,
                               IllegalAccessException,
                               IllegalArgumentException,
                               InvocationTargetException
Initializes a new instance of an unweighted graph analyzer that doesn't keep track of progress.

Parameters:
graph - The graph to be analyzed.
Throws:
NoSuchMethodException
InstantiationException
IllegalAccessException
IllegalArgumentException
InvocationTargetException
Method Detail

calculateShortestPathsFromNode

protected BFSForCentrality<E> calculateShortestPathsFromNode(VUCent startNode)
Calculates the number of shortest paths from startNode to every other node and the lengths of these paths using a Breadth-First Search (BFS), storing them in the appropriate node info of #nodeBetweenness; also updates the predecessor sets.

Specified by:
calculateShortestPathsFromNode in class GraphAnalyzer<VUCent,E extends EdgeCent,UnweightedPathLengthData>
Parameters:
startNode - The start node.
Returns:
The GraphSearchAlgorithm used to find the shortest paths.

computeAll

public void computeAll()
                throws InstantiationException,
                       IllegalAccessException,
                       IllegalArgumentException,
                       InvocationTargetException
Description copied from class: GraphAnalyzer
Performs graph analysis and stores the results in a hash map, mapping each node to a data structure holding the results of the analysis.

Overrides:
computeAll in class GraphAnalyzer<VUCent,E extends EdgeCent,UnweightedPathLengthData>
Throws:
InstantiationException
IllegalAccessException
IllegalArgumentException
InvocationTargetException


Copyright © 2014. All Rights Reserved.