edu.uci.ics.jung.statistics
Class DegreeDistributions

java.lang.Object
  extended byedu.uci.ics.jung.statistics.DegreeDistributions

public class DegreeDistributions
extends java.lang.Object

Set of general-purpose functions for analyzing the degree distribution of a set of vertices (normally the complete set of vertices associated with a graph). These include:

Author:
Scott White

Constructor Summary
DegreeDistributions()
           
 
Method Summary
static Histogram getIndegreeHistogram(java.util.Set vertices, double min, double max, int numBins)
          Generates a histogram of the indegree distribution for a set of vertices
static cern.colt.list.DoubleArrayList getIndegreeValues(java.util.Set vertices)
          Given a set of vertices, this function returns a list of indegress
static Histogram getOutdegreeHistogram(java.util.Set vertices, double min, double max, int numBins)
          Generates a histogram of the outdegree distribution for a set of vertices
static cern.colt.list.DoubleArrayList getOutdegreeValues(java.util.Set vertices)
          Given a set of vertices, this function returns a list of outdegress
static void saveDistribution(Histogram histogram, java.lang.String file)
          Saves the empirical degree distribution to a file in the ascii flat file where each line has the following format: <# of vertices with this degree>
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DegreeDistributions

public DegreeDistributions()
Method Detail

getOutdegreeValues

public static cern.colt.list.DoubleArrayList getOutdegreeValues(java.util.Set vertices)
Given a set of vertices, this function returns a list of outdegress

Parameters:
vertices - the vertices whose outdegrees are to be analyzed
Returns:
a list of outdegrees

getIndegreeValues

public static cern.colt.list.DoubleArrayList getIndegreeValues(java.util.Set vertices)
Given a set of vertices, this function returns a list of indegress

Parameters:
vertices - the vertices whose indegrees are to be analyzed
Returns:
a list of indegrees

getOutdegreeHistogram

public static Histogram getOutdegreeHistogram(java.util.Set vertices,
                                              double min,
                                              double max,
                                              int numBins)
Generates a histogram of the outdegree distribution for a set of vertices

Parameters:
vertices - the set of vertices to be analyzed
min - the minimum value of the data to be binned
max - the maximum value of the data to be binned
numBins - the number of bins to be created
Returns:
the histogram instance

getIndegreeHistogram

public static Histogram getIndegreeHistogram(java.util.Set vertices,
                                             double min,
                                             double max,
                                             int numBins)
Generates a histogram of the indegree distribution for a set of vertices

Parameters:
vertices - the set of vertices to be analyzed
min - the minimum value of the data to be binned
max - the maximum value of the data to be binned
numBins - the number of bins to be created
Returns:
the histogram instance

saveDistribution

public static void saveDistribution(Histogram histogram,
                                    java.lang.String file)
Saves the empirical degree distribution to a file in the ascii flat file where each line has the following format: <# of vertices with this degree>

Parameters:
histogram - a histogram representing a degree distribution
file - the name of the file where the data is to be saved