public class DegreeDistributions
extends java.lang.Object
| Constructor and Description |
|---|
DegreeDistributions() |
| Modifier and Type | Method and Description |
|---|---|
static cern.colt.list.DoubleArrayList |
getDegreeValues(java.util.Set vertices)
Given a set of vertices, this function returns a list of degrees.
|
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 indegrees.
|
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 outdegrees.
|
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:
|
public static cern.colt.list.DoubleArrayList getDegreeValues(java.util.Set vertices)
vertices - the vertices whose degrees are to be analyzedpublic static cern.colt.list.DoubleArrayList getOutdegreeValues(java.util.Set vertices)
vertices - the vertices whose outdegrees are to be analyzedpublic static cern.colt.list.DoubleArrayList getIndegreeValues(java.util.Set vertices)
vertices - the vertices whose indegrees are to be analyzedpublic static Histogram getOutdegreeHistogram(java.util.Set vertices, double min, double max, int numBins)
vertices - the set of vertices to be analyzedmin - the minimum value of the data to be binnedmax - the maximum value of the data to be binnednumBins - the number of bins to be createdpublic static Histogram getIndegreeHistogram(java.util.Set vertices, double min, double max, int numBins)
vertices - the set of vertices to be analyzedmin - the minimum value of the data to be binnedmax - the maximum value of the data to be binnednumBins - the number of bins to be createdpublic static void saveDistribution(Histogram histogram, java.lang.String file)
histogram - a histogram representing a degree distributionfile - the name of the file where the data is to be saved