Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.uci.ics.jung.statistics
Class DegreeDistributions

    java.lang.Object
      edu.uci.ics.jung.statistics.DegreeDistributions

public class DegreeDistributions
extends 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:

- statistical summary (set of fundamental point statistics) of outdegree distribution
- statistical summary (set of fundamental point statistics) of indegree distribution
- histogram of outdegree distribution
- histogram of outdegree distribution
- function for saving degree information to a file

Author:
  Scott White

Constructor Summary
`DegreeDistributions()`

Method Summary
`static DoubleArrayList` | `getDegreeValues(Set vertices)` Given a set of vertices, this function returns a list of degrees.
`static Histogram` | `getIndegreeHistogram(Set vertices, double min, double max, int numBins)` Generates a histogram of the indegree distribution for a set of vertices
`static DoubleArrayList` | `getIndegreeValues(Set vertices)` Given a set of vertices, this function returns a list of indegrees.
`static Histogram` | `getOutdegreeHistogram(Set vertices, double min, double max, int numBins)` Generates a histogram of the outdegree distribution for a set of vertices
`static DoubleArrayList` | `getOutdegreeValues(Set vertices)` Given a set of vertices, this function returns a list of outdegrees.
`static void` | `saveDistribution(Histogram histogram, 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
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DegreeDistributions

    public DegreeDistributions()

Method Detail

### getDegreeValues

    public static DoubleArrayList getDegreeValues(Set vertices)

  Given a set of vertices, this function returns a list of degrees.

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

### getOutdegreeValues

    public static DoubleArrayList getOutdegreeValues(Set vertices)

  Given a set of vertices, this function returns a list of outdegrees.

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

### getIndegreeValues

    public static DoubleArrayList getIndegreeValues(Set vertices)

  Given a set of vertices, this function returns a list of indegrees.

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

### getOutdegreeHistogram

    public static Histogram getOutdegreeHistogram(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(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,
                                        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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD