Class Stats

java.lang.Object
it.unimi.dsi.webgraph.Stats

public class Stats extends Object
Computes basic statistical data about a given graph.

This class loads a graph of given basename, and computes the following data:

  1. an ASCII file containing the outdegree distribution; line n contains the number of nodes with outdegree n (starting from 0);
  2. an ASCII file containing the indegree distribution; line n contains the number of nodes with indegree n (starting from 0);
  3. a property file containing several self-descriptive data, such as the average indegree/outdegree (which should be identical), sample nodes with minimum or maximum indegree/outdegree, and so on; additional data will be computed if files produced by StronglyConnectedComponents are present with the same basename (in particular, buckets and component sizes);
  4. if files produced by StronglyConnectedComponents are present with the same basename, an ASCII file containing the distribution of strongly connected components, specified as a sequence of lines each containing a pair of integer <size, count>.

The graph is loaded offline: the only memory allocated is for indegree count (one integer per node) and for storing the actual counts (one integer per indegree/outdegree value).

  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    main(String[] arg)
     
    static void
    run(ImmutableGraph graph, it.unimi.dsi.bits.LongArrayBitVector buckets, int[] sccsize, CharSequence resultsBasename, boolean saveDegrees, it.unimi.dsi.logging.ProgressLogger pl)
    Computes stats for the given graph using a single traversal, storing the results in files with given basename.
    static void
    run(ImmutableGraph graph, it.unimi.dsi.bits.LongArrayBitVector buckets, int[] sccsize, CharSequence resultsBasename, it.unimi.dsi.logging.ProgressLogger pl)
    Computes stats for the given graph using a single traversal, storing the results in files with given basename.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait