edu.uci.ics.jung.algorithms
Class GraphStatistics

java.lang.Object
  extended by edu.uci.ics.jung.algorithms.GraphStatistics

public class GraphStatistics
extends Object

A set of statistical measures for structural properties of a graph.

Author:
Scott White, Joshua O'Madadhain

Constructor Summary
GraphStatistics()
           
 
Method Summary
static
<V,E> double
diameter(Graph<V,E> g)
          Returns the diameter of g, ignoring edge weights.
static
<V,E> double
diameter(Graph<V,E> g, Distance<V> d)
          Returns the diameter of g using the metric specified by d.
static
<V,E> double
diameter(Graph<V,E> g, Distance<V> d, boolean use_max)
          Returns the diameter of g using the metric specified by d.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphStatistics

public GraphStatistics()
Method Detail

diameter

public static <V,E> double diameter(Graph<V,E> g,
                                    Distance<V> d,
                                    boolean use_max)
Returns the diameter of g using the metric specified by d. The diameter is defined to be the maximum, over all pairs of vertices u,v, of the length of the shortest path from u to v. If the graph is disconnected (that is, not all pairs of vertices are reachable from one another), the value returned will depend on use_max: if use_max == true, the value returned will be the the maximum shortest path length over all pairs of connected vertices; otherwise it will be Double.POSITIVE_INFINITY.


diameter

public static <V,E> double diameter(Graph<V,E> g,
                                    Distance<V> d)
Returns the diameter of g using the metric specified by d. The diameter is defined to be the maximum, over all pairs of vertices u,v, of the length of the shortest path from u to v, or Double.POSITIVE_INFINITY if any of these distances do not exist.

See Also:
diameter(Graph, Distance, boolean)

diameter

public static <V,E> double diameter(Graph<V,E> g)
Returns the diameter of g, ignoring edge weights.

See Also:
diameter(Graph, Distance, boolean)


Copyright © 2007. All Rights Reserved.