degree_stats dupflag -i in1
dupflag = 1/2 for counting edge once/twice in1 = graph edges: Key = Vi Vj, Value = NULL
degree_stats 2 -i edges
This is a named command which calculates and prints out the degree statistics of an undirected graph. For each degree d, one line is printed to the screen with the number of vertices of degree d. This is done in sorted order.
If the dupflag is 2, then each edge increments the degree of both of its vertices. If the dupflag is 1, then each edge only increments the degree of the first of its vertices. The former is usually more approrpriate for undirected graphs; the latter for directed graphs, in which case the out-degree of each vertex is being calculated. The latter can also be useful if the graph represents a sparse matrix and you want the statistics on non-zeroes in each row of the matrix.
See the named command doc page for various ways in which the -i inputs and -o outputs for a named command can be specified.
In1 stores a set of edges. No assumption is made about duplicates or self edges, i.e. (Vi,Vj) may appear multiple times, both (Vi,Vj) or (Vj,Vi) may appear, as may (Vi,Vi). The input is unchanged by this command.
This command produces no output.
Statistics on the degree count of each vertex will be printed to the screen in sorted order.